Class: Backline::Model::Attributes::Attribute
- Inherits:
-
Struct
- Object
- Struct
- Backline::Model::Attributes::Attribute
- Defined in:
- lib/backline/model/attributes/attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #getter_method ⇒ Object
-
#initialize(name, options = {}) ⇒ Attribute
constructor
A new instance of Attribute.
- #setter_method ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 |
# File 'lib/backline/model/attributes/attribute.rb', line 6 def initialize(name, = {}) super(name.to_s, ) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/backline/model/attributes/attribute.rb', line 4 def name @name end |
#options ⇒ Object
Returns the value of attribute options
4 5 6 |
# File 'lib/backline/model/attributes/attribute.rb', line 4 def @options end |
Instance Method Details
#getter_method ⇒ Object
10 11 12 |
# File 'lib/backline/model/attributes/attribute.rb', line 10 def getter_method name end |
#setter_method ⇒ Object
14 15 16 |
# File 'lib/backline/model/attributes/attribute.rb', line 14 def setter_method "#{name}=" end |