Module: DCGOV::EasyClassMaker::ClassMethods
- Defined in:
- lib/dcgov/easy_class_maker.rb
Class Method Summary collapse
-
.attributes ⇒ Object
read method for attributes class variable.
Instance Method Summary collapse
-
#attributes(*attrs) ⇒ Object
creates the attributes class variable and creates each attribute’s accessor methods.
Class Method Details
.attributes ⇒ Object
read method for attributes class variable
21 |
# File 'lib/dcgov/easy_class_maker.rb', line 21 def self.attributes; @@attributes end |
Instance Method Details
#attributes(*attrs) ⇒ Object
creates the attributes class variable and creates each attribute’s accessor methods
15 16 17 18 |
# File 'lib/dcgov/easy_class_maker.rb', line 15 def attributes(*attrs) @@attributes = attrs @@attributes.each { |a| attr_accessor a } end |