Class: Traco::AttributeSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/traco/attribute_setup.rb

Constant Summary collapse

INSTANCE_METHODS_MODULE_NAME =
"TracoInstanceMethods"

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ AttributeSetup

Returns a new instance of AttributeSetup.



5
6
7
# File 'lib/traco/attribute_setup.rb', line 5

def initialize(klass)
  @klass = klass
end

Instance Method Details

#set_up(attributes, options) ⇒ Object



9
10
11
12
13
14
# File 'lib/traco/attribute_setup.rb', line 9

def set_up(attributes, options)
  ensure_class_methods
  ensure_attribute_list
  ensure_instance_methods_module
  add_attributes attributes, options
end