Class: Inspec::RunData::Statistics::Controls
- Inherits:
-
Struct
- Object
- Struct
- Inspec::RunData::Statistics::Controls
- Includes:
- HashLikeStruct
- Defined in:
- lib/inspec/run_data/statistics.rb,
lib/inspec/run_data/statistics.rb
Defined Under Namespace
Classes: Total
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#not_applicable ⇒ Object
Returns the value of attribute not_applicable.
-
#not_reviewed ⇒ Object
Returns the value of attribute not_reviewed.
-
#passed ⇒ Object
Returns the value of attribute passed.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(raw_stat_ctl_data) ⇒ Controls
constructor
A new instance of Controls.
Methods included from HashLikeStruct
Constructor Details
#initialize(raw_stat_ctl_data) ⇒ Controls
Returns a new instance of Controls.
25 26 27 28 29 30 31 32 33 |
# File 'lib/inspec/run_data/statistics.rb', line 25 def initialize(raw_stat_ctl_data) self.total = raw_stat_ctl_data[:total] self.passed = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:passed][:total]) self.failed = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:failed][:total]) self.skipped = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:skipped][:total]) if raw_stat_ctl_data[:skipped] self.not_reviewed = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:not_reviewed][:total]) if raw_stat_ctl_data[:not_reviewed] self.not_applicable = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:not_applicable][:total]) if raw_stat_ctl_data[:not_applicable] self.error = Inspec::RunData::Statistics::Controls::Total.new(raw_stat_ctl_data[:error][:total]) if raw_stat_ctl_data[:error] end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def error @error end |
#failed ⇒ Object
Returns the value of attribute failed
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def failed @failed end |
#not_applicable ⇒ Object
Returns the value of attribute not_applicable
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def not_applicable @not_applicable end |
#not_reviewed ⇒ Object
Returns the value of attribute not_reviewed
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def not_reviewed @not_reviewed end |
#passed ⇒ Object
Returns the value of attribute passed
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def passed @passed end |
#skipped ⇒ Object
Returns the value of attribute skipped
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def skipped @skipped end |
#total ⇒ Object
Returns the value of attribute total
15 16 17 |
# File 'lib/inspec/run_data/statistics.rb', line 15 def total @total end |