Class: Librato::Metrics::Persistence::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/librato/metrics/persistence/test.rb

Instance Method Summary collapse

Instance Method Details

#persist(client, metrics, options = {}) ⇒ Object

persist the given metrics



9
10
11
12
# File 'lib/librato/metrics/persistence/test.rb', line 9

def persist(client, metrics, options={})
  @persisted = metrics
  return !@return_value.nil? ? @return_value : true
end

#persistedObject

return what was persisted



15
16
17
# File 'lib/librato/metrics/persistence/test.rb', line 15

def persisted
  @persisted
end

#return_value(value) ⇒ Object

force a return value from persistence



20
21
22
# File 'lib/librato/metrics/persistence/test.rb', line 20

def return_value(value)
  @return_value = value
end