Class: Inspec::RunData::Result
- Inherits:
 - 
      Struct
      
        
- Object
 - Struct
 - Inspec::RunData::Result
 
 
- Includes:
 - HashLikeStruct
 
- Defined in:
 - lib/inspec/run_data/result.rb
 
Instance Attribute Summary collapse
- 
  
    
      #backtrace  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute backtrace.
 - 
  
    
      #code_desc  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute code_desc.
 - 
  
    
      #exception  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute exception.
 - 
  
    
      #expectation_message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute expectation_message.
 - 
  
    
      #message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute message.
 - 
  
    
      #resource  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute resource.
 - 
  
    
      #resource_name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute resource_name.
 - 
  
    
      #resource_params  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute resource_params.
 - 
  
    
      #resource_title  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute resource_title.
 - 
  
    
      #run_time  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute run_time.
 - 
  
    
      #skip_message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute skip_message.
 - 
  
    
      #start_time  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute start_time.
 - 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute status.
 
Instance Method Summary collapse
- 
  
    
      #initialize(raw_res_data)  ⇒ Result 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Result.
 
Methods included from HashLikeStruct
Constructor Details
#initialize(raw_res_data) ⇒ Result
Returns a new instance of Result.
      20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  | 
    
      # File 'lib/inspec/run_data/result.rb', line 20 def initialize(raw_res_data) [ :status, # String :code_desc, # Generated test description :expectation_message, # a substring of code_desc :skip_message, # String :run_time, :start_time, :resource_title, :resource, :exception, :backtrace, :message, ].each do |field| self[field] = raw_res_data[field] end self.resource_name = raw_res_data[:resource_title].instance_variable_get(:@__resource_name__)&.to_s self.resource_params = raw_res_data[:resource_title].instance_variable_get(:@grep)&.to_s end  | 
  
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def backtrace @backtrace end  | 
  
#code_desc ⇒ Object
Returns the value of attribute code_desc
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def code_desc @code_desc end  | 
  
#exception ⇒ Object
Returns the value of attribute exception
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def exception @exception end  | 
  
#expectation_message ⇒ Object
Returns the value of attribute expectation_message
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def @expectation_message end  | 
  
#message ⇒ Object
Returns the value of attribute message
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def @message end  | 
  
#resource ⇒ Object
Returns the value of attribute resource
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def resource @resource end  | 
  
#resource_name ⇒ Object
Returns the value of attribute resource_name
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def resource_name @resource_name end  | 
  
#resource_params ⇒ Object
Returns the value of attribute resource_params
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def resource_params @resource_params end  | 
  
#resource_title ⇒ Object
Returns the value of attribute resource_title
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def resource_title @resource_title end  | 
  
#run_time ⇒ Object
Returns the value of attribute run_time
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def run_time @run_time end  | 
  
#skip_message ⇒ Object
Returns the value of attribute skip_message
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def @skip_message end  | 
  
#start_time ⇒ Object
Returns the value of attribute start_time
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def start_time @start_time end  | 
  
#status ⇒ Object
Returns the value of attribute status
      3 4 5  | 
    
      # File 'lib/inspec/run_data/result.rb', line 3 def status @status end  |