public Method

Module.attr_internal_writer(*attrs)

Declare an attribute writer backed by an internally-named instance variable.

Source Code

# File active_support/core_ext/module/attr_internal.rb, line 10
def attr_internal_writer(*attrs)
  attrs.each do |attr|
    module_eval "def #{attr}=(v) #{attr_internal_ivar_name(attr)} = v 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.