Module: Backline::Model::Attributes::ClassMethods
- Defined in:
- lib/backline/model/attributes.rb
Instance Method Summary collapse
Instance Method Details
#attribute(name, options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/backline/model/attributes.rb', line 14 def attribute(name, = {}) Attribute.new(name, .merge(model_class: self)).tap do |attribute| attributes[attribute.name] = attribute generate_accessors(attribute) end end |
#attribute_names ⇒ Object
21 22 23 |
# File 'lib/backline/model/attributes.rb', line 21 def attribute_names attributes.keys end |