Module: Kamakura::ClassMethods

Defined in:
lib/kamakura.rb

Instance Method Summary collapse

Instance Method Details

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



6
7
8
9
10
# File 'lib/kamakura.rb', line 6

def attribute(name, type, options = {})
  attribute = Attribute.new(name, type, options)
  register_attribute(attribute)
  define_attribute_reader_method(attribute)
end

#attribute_setObject



16
17
18
# File 'lib/kamakura.rb', line 16

def attribute_set
  @__attribute_set ||= {}
end

#parse(attributes = {}, **options) ⇒ Object



12
13
14
# File 'lib/kamakura.rb', line 12

def parse(attributes = {}, **options)
  new(attributes)
end