Class: Inspec::RunData::Statistics

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

Overview

:controls=>{:total=>3, :passed=>{:total=>3, :skipped=>:total=>0, :failed=>:total=>0}}

Defined Under Namespace

Classes: Controls

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_stat_data) ⇒ Statistics

Returns a new instance of Statistics.



9
10
11
12
# File 'lib/inspec/run_data/statistics.rb', line 9

def initialize(raw_stat_data)
  self.controls = Inspec::RunData::Statistics::Controls.new(raw_stat_data[:controls])
  self.duration = raw_stat_data[:duration]
end

Instance Attribute Details

#controlsObject

Returns the value of attribute controls

Returns:

  • (Object)

    the current value of controls



4
5
6
# File 'lib/inspec/run_data/statistics.rb', line 4

def controls
  @controls
end

#durationObject

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



4
5
6
# File 'lib/inspec/run_data/statistics.rb', line 4

def duration
  @duration
end