Class: Controls::ConfigurationCoverage
- Inherits:
-
Dish::Plate
- Object
- Dish::Plate
- Controls::ConfigurationCoverage
- Includes:
- Comparable
- Defined in:
- lib/controls/objects/configuration_coverage.rb
Overview
A representation of the Configuration resource with coverage information
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#respond_to?(method_name) ⇒ Boolean
- review
-
define this in Dish?.
-
-
#to_s ⇒ String
The title of the configuration.
- #without_coverage ⇒ Object
- #without_coverage! ⇒ Object
Instance Method Details
#<=>(other) ⇒ Object
11 12 13 14 |
# File 'lib/controls/objects/configuration_coverage.rb', line 11 def <=>(other) return unless other.respond_to? :coverage coverage.percent_covered <=> other.coverage.percent_covered end |
#respond_to?(method_name) ⇒ Boolean
- review
-
define this in Dish?
-
17 18 19 20 21 22 23 |
# File 'lib/controls/objects/configuration_coverage.rb', line 17 def respond_to?(method_name, *) if method_name.eql? :coverage true else super end end |
#to_s ⇒ String
The title of the configuration
38 39 40 |
# File 'lib/controls/objects/configuration_coverage.rb', line 38 def to_s title end |
#without_coverage ⇒ Object
25 26 27 |
# File 'lib/controls/objects/configuration_coverage.rb', line 25 def without_coverage Controls::Configuration.new(enabled: enabled, name: name) end |
#without_coverage! ⇒ Object
29 30 31 32 33 |
# File 'lib/controls/objects/configuration_coverage.rb', line 29 def without_coverage! @_original_hash.delete_if do |key, _value| not %w[enabled name].include?(key) end end |