Module: CurlyMustache::Attributes::ClassMethods

Defined in:
lib/curly_mustache/attributes.rb

Instance Method Summary collapse

Instance Method Details

#allow_settable_id!(settable = true) ⇒ Object



35
36
37
# File 'lib/curly_mustache/attributes.rb', line 35

def allow_settable_id!(settable = true)
  self.allow_settable_id = settable
end

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



23
24
25
# File 'lib/curly_mustache/attributes.rb', line 23

def attribute(name, type, options = {})
  attribute_manager.define(self, name, type, options)
end

#attribute_type(name) ⇒ Object



31
32
33
# File 'lib/curly_mustache/attributes.rb', line 31

def attribute_type(name)
  attribute_manager[name].type
end

#attributesObject



27
28
29
# File 'lib/curly_mustache/attributes.rb', line 27

def attributes
  attribute_manager.definitions
end