Class: Inspec::RunData::Platform

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_plat_data) ⇒ Platform

Returns a new instance of Platform.



61
62
63
# File 'lib/inspec/run_data.rb', line 61

def initialize(raw_plat_data)
  %i{name release target}.each { |f| self[f] = raw_plat_data[f] || "" }
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



57
58
59
# File 'lib/inspec/run_data.rb', line 57

def name
  @name
end

#releaseObject

Returns the value of attribute release

Returns:

  • (Object)

    the current value of release



57
58
59
# File 'lib/inspec/run_data.rb', line 57

def release
  @release
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



57
58
59
# File 'lib/inspec/run_data.rb', line 57

def target
  @target
end