Class: LitmusPaper::Metric::ConstantMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/litmus_paper/metric/constant_metric.rb

Instance Method Summary collapse

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_healthObject



8
9
10
# File 'lib/litmus_paper/metric/constant_metric.rb', line 8

def current_health
  @weight
end

#statsObject



12
13
14
# File 'lib/litmus_paper/metric/constant_metric.rb', line 12

def stats
  {}
end

#to_sObject



16
17
18
# File 'lib/litmus_paper/metric/constant_metric.rb', line 16

def to_s
  "Metric::ConstantMetric(#{@weight})"
end