Class: LMC::DeviceDSCUi::Item
- Inherits:
-
Object
- Object
- LMC::DeviceDSCUi::Item
- Defined in:
- lib/lmc/config/device_dsc_ui.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(item_wrapper) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(item_wrapper) ⇒ Item
78 79 80 81 82 83 84 85 86 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 78 def initialize(item_wrapper) keys = item_wrapper.keys raise('More than one key contained in item wrapper') if keys.length > 1 @type = keys.first item = item_wrapper[@type] @id = item['id'] @descriptions = [] @descriptions << item['description'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
72 73 74 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 72 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
72 73 74 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 72 def type @type end |
Class Method Details
Instance Method Details
#description ⇒ Object
88 89 90 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 88 def description @descriptions.join(',') end |