Class: Librato::Metrics::Persistence::Test
- Inherits:
-
Object
- Object
- Librato::Metrics::Persistence::Test
- Defined in:
- lib/librato/metrics/persistence/test.rb
Instance Method Summary collapse
-
#persist(client, metrics, options = {}) ⇒ Object
persist the given metrics.
-
#persisted ⇒ Object
return what was persisted.
-
#return_value(value) ⇒ Object
force a return value from persistence.
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, ={}) @persisted = metrics return !@return_value.nil? ? @return_value : true end |
#persisted ⇒ Object
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 |