Attribute Methods 文件下的内容
[]
[]=attributes
attribute_names
attribute_for_inspect
attribute_present?
has_attribute?# 在 Read 模块里定义
attribute
# 在 Write 模块里定义
attribute=# 在 Query 模块里定义
attribute?最后更新于
[]
[]=attributes
attribute_names
attribute_for_inspect
attribute_present?
has_attribute?# 在 Read 模块里定义
attribute
# 在 Write 模块里定义
attribute=# 在 Query 模块里定义
attribute?最后更新于
# 如果要覆盖的话,通常会修改以下方法
user.name
user.name=# 以下方法不会覆盖,仍然得到原来的值
user[:name]
user[:name]=