Class: LitmusPaper::Metric::ConstantMetric
- Inherits:
-
Object
- Object
- LitmusPaper::Metric::ConstantMetric
- Defined in:
- lib/litmus_paper/metric/constant_metric.rb
Instance Method Summary collapse
- #current_health ⇒ Object
-
#initialize(weight) ⇒ ConstantMetric
constructor
A new instance of ConstantMetric.
- #stats ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(weight) ⇒ ConstantMetric
Returns a new instance of ConstantMetric.
4 5 6 |
# File 'lib/litmus_paper/metric/constant_metric.rb', line 4 def initialize(weight) @weight = weight end |
Instance Method Details
#current_health ⇒ Object
8 9 10 |
# File 'lib/litmus_paper/metric/constant_metric.rb', line 8 def current_health @weight end |
#stats ⇒ Object
12 13 14 |
# File 'lib/litmus_paper/metric/constant_metric.rb', line 12 def stats {} end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/litmus_paper/metric/constant_metric.rb', line 16 def to_s "Metric::ConstantMetric(#{@weight})" end |