method
mattr_reader
mattr_reader(*syms)
public
Hide source
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 16 def mattr_reader(*syms) options = syms.extract_options! syms.each do |sym| next if sym.is_a?(Hash) class_eval("unless defined? @@\#{sym}\n@@\#{sym} = nil\nend\n\ndef self.\#{sym}\n@@\#{sym}\nend\n", __FILE__, __LINE__ + 1) unless options[:instance_reader] == false class_eval("def \#{sym}\n@@\#{sym}\nend\n", __FILE__, __LINE__ + 1) end end end