Class: MetricsSatellite::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/metrics_satellite/reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hostObject (readonly)

Returns the value of attribute host.



5
6
7
# File 'lib/metrics_satellite/reporter.rb', line 5

def host
  @host
end

#sectionObject (readonly)

Returns the value of attribute section.



5
6
7
# File 'lib/metrics_satellite/reporter.rb', line 5

def section
  @section
end

#serviceObject (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