method
mattr_reader
v3.2.13 -
Show latest stable
- Class:
Module
mattr_reader(*syms)public
No documentation available.
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 4
def mattr_reader(*syms)
options = syms.extract_options!
syms.each do |sym|
class_eval( @@#{sym} = nil unless defined? @@#{sym} def self.#{sym} @@#{sym} end, __FILE__, __LINE__ + 1)
unless options[:instance_reader] == false || options[:instance_accessor] == false
class_eval( def #{sym} @@#{sym} end, __FILE__, __LINE__ + 1)
end
end
end