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.



76
77
78
79
80
81
82
83
84
85
# File 'lib/inspec/run_data/control.rb', line 76

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



68
69
70
# File 'lib/inspec/run_data/control.rb', line 68

def expiration_date
  @expiration_date
end

#justificationObject

Returns the value of attribute justification

Returns:

  • (Object)

    the current value of justification



68
69
70
# File 'lib/inspec/run_data/control.rb', line 68

def justification
  @justification
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



68
69
70
# File 'lib/inspec/run_data/control.rb', line 68

def message
  @message
end

#runObject

Returns the value of attribute run

Returns:

  • (Object)

    the current value of run



68
69
70
# File 'lib/inspec/run_data/control.rb', line 68

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



68
69
70
# File 'lib/inspec/run_data/control.rb', line 68

def skipped_due_to_waiver
  @skipped_due_to_waiver
end