Class: Riemann::State

Inherits:
Object
  • Object
show all
Includes:
Beefcake::Message
Defined in:
lib/riemann/state.rb

Instance Method Summary collapse

Constructor Details

#initialize(*a) ⇒ State

Returns a new instance of State.



15
16
17
18
19
# File 'lib/riemann/state.rb', line 15

def initialize(*a)
  super *a

  @time ||= Time.now.to_i
end

Instance Method Details

#metricObject



21
22
23
# File 'lib/riemann/state.rb', line 21

def metric
  @metric || metric_f
end

#metric=(m) ⇒ Object



25
26
27
# File 'lib/riemann/state.rb', line 25

def metric=(m)
  @metric = m
end