Module: RFunk::AttributeDefinition

Defined in:
lib/rfunk/attribute/attribute_definition.rb

Instance Method Summary collapse

Instance Method Details

#attribute(name, type, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rfunk/attribute/attribute_definition.rb', line 3

def attribute(name, type, options = {})
  RFunk::AttributeVariable.new.add(instance: self,
                                   name: name,
                                   type: type,
                                   options: options)

  create_method(name, type)
end