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
<code/>and<pre/>for code samples.