Class: Rafflesia::ModuleUnit
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ModuleUnit
- Defined in:
- lib/rafflesia/registry/module_unit.rb
Constant Summary collapse
- HASH_ATTRS =
{ description: :description, dimension: :dimension, symbol: :symbol, value: :value }.freeze
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#dimension ⇒ Object
Returns the value of attribute dimension.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(json) ⇒ ModuleUnit
constructor
A new instance of ModuleUnit.
Constructor Details
#initialize(json) ⇒ ModuleUnit
Returns a new instance of ModuleUnit.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/registry/module_unit.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @description = hash[:description] @dimension = hash[:dimension] @symbol = hash[:symbol] @value = hash[:value] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
15 16 17 |
# File 'lib/rafflesia/registry/module_unit.rb', line 15 def description @description end |
#dimension ⇒ Object
Returns the value of attribute dimension.
15 16 17 |
# File 'lib/rafflesia/registry/module_unit.rb', line 15 def dimension @dimension end |
#symbol ⇒ Object
Returns the value of attribute symbol.
15 16 17 |
# File 'lib/rafflesia/registry/module_unit.rb', line 15 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value.
15 16 17 |
# File 'lib/rafflesia/registry/module_unit.rb', line 15 def value @value end |