Module: Twitter::EasyClassMaker::ClassMethods

Defined in:
lib/twitter/easy_class_maker.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.attributesObject

read method for attributes class variable



19
# File 'lib/twitter/easy_class_maker.rb', line 19

def self.attributes; @@attributes end

Instance Method Details

#attributes(*attrs) ⇒ Object

creates the attributes class variable and creates each attribute’s accessor methods



13
14
15
16
# File 'lib/twitter/easy_class_maker.rb', line 13

def attributes(*attrs)
  @@attributes = attrs
  @@attributes.each { |a| attr_accessor a }
end