mattr_reader(*syms)
Instance Public methods
Defines a class attribute and creates a class and instance reader methods.
The underlying the class variable is set to nil, if it is not
previously defined.
module HairColors
mattr_reader :hair_colors
end
HairColors.hair_colors # => nil
HairColors.class_variable_set("@@hair_colors", [:brown, :black])
HairColors.hair_colors # => [:brown, :black]
The attribute name must be a valid method name in Ruby.
module Foo
mattr_reader :"1