Class: Inspec::RunData::Profile::Group
- Inherits:
-
Struct
- Object
- Struct
- Inspec::RunData::Profile::Group
- Includes:
- HashLikeStruct
- Defined in:
- lib/inspec/run_data/profile.rb
Overview
Good candidate for keyword_init, but that is not in 2.4
Instance Attribute Summary collapse
-
#controls ⇒ Object
Returns the value of attribute controls.
-
#id ⇒ Object
Returns the value of attribute id.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(raw_grp_data) ⇒ Group
constructor
A new instance of Group.
Methods included from HashLikeStruct
Constructor Details
#initialize(raw_grp_data) ⇒ Group
Returns a new instance of Group.
79 80 81 82 |
# File 'lib/inspec/run_data/profile.rb', line 79 def initialize(raw_grp_data) %i{title id}.each { |f| self[f] = raw_grp_data[f] } [:controls].each { |f| self[f] = raw_grp_data[f] || [] } end |
Instance Attribute Details
#controls ⇒ Object
Returns the value of attribute controls
75 76 77 |
# File 'lib/inspec/run_data/profile.rb', line 75 def controls @controls end |
#id ⇒ Object
Returns the value of attribute id
75 76 77 |
# File 'lib/inspec/run_data/profile.rb', line 75 def id @id end |
#title ⇒ Object
Returns the value of attribute title
75 76 77 |
# File 'lib/inspec/run_data/profile.rb', line 75 def title @title end |