Declare an attribute reader backed by an internally-named instance variable.
Source Code
# File 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
<code/>and<pre/>for code samples.