Class: Inspec::RunData::Profile::Group

Inherits:
Struct
  • Object
show all
Includes:
HashLikeStruct
Defined in:
lib/inspec/run_data/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_grp_data) ⇒ Group

Returns a new instance of Group.



77
78
79
80
# File 'lib/inspec/run_data/profile.rb', line 77

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

#controlsObject

Returns the value of attribute controls

Returns:

  • (Object)

    the current value of controls



73
74
75
# File 'lib/inspec/run_data/profile.rb', line 73

def controls
  @controls
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



73
74
75
# File 'lib/inspec/run_data/profile.rb', line 73

def id
  @id
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



73
74
75
# File 'lib/inspec/run_data/profile.rb', line 73

def title
  @title
end