Module: CurlyMustache::Attributes::ClassMethods
- Defined in:
- lib/curly_mustache/attributes.rb
Instance Method Summary collapse
- #allow_settable_id!(settable = true) ⇒ Object
- #attribute(name, type, options = {}) ⇒ Object
- #attribute_type(name) ⇒ Object
- #attributes ⇒ Object
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, = {}) attribute_manager.define(self, name, type, ) 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 |
#attributes ⇒ Object
27 28 29 |
# File 'lib/curly_mustache/attributes.rb', line 27 def attributes attribute_manager.definitions end |