public Method

Module.attr_internal_reader(*attrs)

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.