method
mattr_writer
v3.0.0 -
Show latest stable
- Class:
Module
mattr_writer(*syms)public
No documentation available.
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 27
def mattr_writer(*syms)
options = syms.extract_options!
syms.each do |sym|
class_eval("def self.\#{sym}=(obj)\n@@\#{sym} = obj\nend\n", __FILE__, __LINE__ + 1)
unless options[:instance_writer] == false
class_eval("def \#{sym}=(obj)\n@@\#{sym} = obj\nend\n", __FILE__, __LINE__ + 1)
end
end
end