Class: StatsD::Instrument::Backends::CaptureBackend
- Inherits:
-
StatsD::Instrument::Backend
- Object
- StatsD::Instrument::Backend
- StatsD::Instrument::Backends::CaptureBackend
- Defined in:
- lib/statsd/instrument/backends/capture_backend.rb
Instance Attribute Summary collapse
-
#collected_metrics ⇒ Object
readonly
Returns the value of attribute collected_metrics.
Instance Method Summary collapse
- #collect_metric(metric) ⇒ Object
-
#initialize ⇒ CaptureBackend
constructor
A new instance of CaptureBackend.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ CaptureBackend
Returns a new instance of CaptureBackend.
5 6 7 |
# File 'lib/statsd/instrument/backends/capture_backend.rb', line 5 def initialize reset end |
Instance Attribute Details
#collected_metrics ⇒ Object (readonly)
Returns the value of attribute collected_metrics.
3 4 5 |
# File 'lib/statsd/instrument/backends/capture_backend.rb', line 3 def collected_metrics @collected_metrics end |
Instance Method Details
#collect_metric(metric) ⇒ Object
9 10 11 |
# File 'lib/statsd/instrument/backends/capture_backend.rb', line 9 def collect_metric(metric) @collected_metrics << metric end |
#reset ⇒ Object
13 14 15 |
# File 'lib/statsd/instrument/backends/capture_backend.rb', line 13 def reset @collected_metrics = [] end |