Class: LMC::DeviceDSCUi::Section
- Inherits:
-
Object
- Object
- LMC::DeviceDSCUi::Section
- Defined in:
- lib/lmc/config/device_dsc_ui.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Instance Method Summary collapse
-
#initialize(section_wrapper) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(section_wrapper) ⇒ Section
Returns a new instance of Section.
50 51 52 53 54 55 56 57 58 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 50 def initialize(section_wrapper) section = section_wrapper['section'] @names = section['name'] members = section['members'] @groups = members.map { |group_wrapper| Group.new group_wrapper unless group_wrapper['group'].nil? }.compact end |
Instance Attribute Details
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
48 49 50 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 48 def groups @groups end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
48 49 50 |
# File 'lib/lmc/config/device_dsc_ui.rb', line 48 def names @names end |