instance method
attr_internal_reader
Ruby on Rails 2.2.3
Since v2.2.3Signature
attr_internal_reader(*attrs)
Declares an attribute reader backed by an internally-named instance variable.
Parameters
-
attrsrest
Source
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 3
def attr_internal_reader(*attrs)
attrs.each do |attr|
module_eval "def #{attr}() #{attr_internal_ivar_name(attr)} end"
end
end
Defined in activesupport/lib/active_support/core_ext/module/attr_internal.rb line 3
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Module