Class: Moblues::DataModel::Attribute
- Inherits:
-
Struct
- Object
- Struct
- Moblues::DataModel::Attribute
- Defined in:
- lib/moblues/data_model/attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(params) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 9 10 11 12 |
# File 'lib/moblues/data_model/attribute.rb', line 6 def initialize(params) p = params.compact super( p.fetch(:name), p.fetch(:type) ) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/moblues/data_model/attribute.rb', line 5 def name @name end |
#type ⇒ Object
Returns the value of attribute type
5 6 7 |
# File 'lib/moblues/data_model/attribute.rb', line 5 def type @type end |