Class: MetricsSatellite::Reporter
- Inherits:
-
Object
- Object
- MetricsSatellite::Reporter
- Defined in:
- lib/metrics_satellite/reporter.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(host, service, section) ⇒ Reporter
constructor
A new instance of Reporter.
- #report(summaries) ⇒ Object
Constructor Details
#initialize(host, service, section) ⇒ Reporter
Returns a new instance of Reporter.
7 8 9 10 11 |
# File 'lib/metrics_satellite/reporter.rb', line 7 def initialize(host, service, section) @host = host @service = service @section = section end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/metrics_satellite/reporter.rb', line 5 def host @host end |
#section ⇒ Object (readonly)
Returns the value of attribute section.
5 6 7 |
# File 'lib/metrics_satellite/reporter.rb', line 5 def section @section end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
5 6 7 |
# File 'lib/metrics_satellite/reporter.rb', line 5 def service @service end |
Instance Method Details
#report(summaries) ⇒ Object
13 14 15 16 17 |
# File 'lib/metrics_satellite/reporter.rb', line 13 def report(summaries) summaries.each do |key, count| post(key, count) end end |