public Method

Class.cattr_writer(*syms)

There's no documentation for this item.

Source Code

# File active_support/core_ext/class/attribute_accessors.rb, line 24
def cattr_writer(*syms)
  options = syms.extract_options!
  syms.flatten.each do |sym|
    class_eval("unless defined? @@\#{sym}\n@@\#{sym} = nil\nend\n\ndef self.\#{sym}=(obj)\n@@\#{sym} = obj\nend\n\n\#{\"\ndef \#{sym}=(obj)\n@@\#{sym} = obj\nend\n\" unless options[:instance_writer] == false }\n", __FILE__, __LINE__)
  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.