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.



63
64
65
# File 'lib/inspec/run_data.rb', line 63

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



59
60
61
# File 'lib/inspec/run_data.rb', line 59

def name
  @name
end

#releaseObject

Returns the value of attribute release

Returns:

  • (Object)

    the current value of release



59
60
61
# File 'lib/inspec/run_data.rb', line 59

def release
  @release
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



59
60
61
# File 'lib/inspec/run_data.rb', line 59

def target
  @target
end