Class: Inspec::RunData::Control::WaiverData

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

Overview

"expiration_date"=>#<Date: 2077-06-01 ((2479821j,0s,0n),+0s,2299161j)>,
"justification"=>"Lack of imagination",
"run"=>false,
"skipped_due_to_waiver"=>true,
"message"=>""

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_wv_data) ⇒ WaiverData

Returns a new instance of WaiverData.



70
71
72
73
74
75
76
77
78
79
# File 'lib/inspec/run_data/control.rb', line 70

def initialize(raw_wv_data)
  # These have string keys in the raw data!
  %i{
    expiration_date
    justification
    run
    skipped_due_to_waiver
    message
  }.each { |f| self[f] = raw_wv_data[f.to_s] }
end

Instance Attribute Details

#expiration_dateObject

Returns the value of attribute expiration_date

Returns:

  • (Object)

    the current value of expiration_date



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

def expiration_date
  @expiration_date
end

#justificationObject

Returns the value of attribute justification

Returns:

  • (Object)

    the current value of justification



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

def justification
  @justification
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



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

def message
  @message
end

#runObject

Returns the value of attribute run

Returns:

  • (Object)

    the current value of run



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

def run
  @run
end

#skipped_due_to_waiverObject

Returns the value of attribute skipped_due_to_waiver

Returns:

  • (Object)

    the current value of skipped_due_to_waiver



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

def skipped_due_to_waiver
  @skipped_due_to_waiver
end