Class: Controls::Configuration
- Inherits:
-
Dish::Plate
- Object
- Dish::Plate
- Controls::Configuration
- Includes:
- Comparable
- Defined in:
- lib/controls/objects/configuration.rb
Overview
A representation of the Configuration resource w/ coverage information
Instance Method Summary collapse
-
#<=>(other) ⇒ Fixnum
Allows for comparison with other objects with coverage information.
-
#respond_to?(method_name) ⇒ Boolean
- review
-
shouldn’t this be covered by the Dish coercion?.
-
-
#to_s ⇒ String
The title of the configuration.
Instance Method Details
#<=>(other) ⇒ Fixnum
Allows for comparison with other objects with coverage information
16 17 18 19 |
# File 'lib/controls/objects/configuration.rb', line 16 def <=>(other) return unless other.respond_to? :coverage coverage.percent_covered <=> other.coverage.percent_covered end |
#respond_to?(method_name) ⇒ Boolean
- review
-
shouldn’t this be covered by the Dish coercion?
-
24 25 26 27 28 29 30 |
# File 'lib/controls/objects/configuration.rb', line 24 def respond_to?(method_name, *) if method_name.eql? :coverage true else super end end |
#to_s ⇒ String
The title of the configuration
35 36 37 |
# File 'lib/controls/objects/configuration.rb', line 35 def to_s title end |