Class: Nexaas::Auditor::StatisticsTrackers::Stathat

Inherits:
Base
  • Object
show all
Defined in:
lib/nexaas/auditor/statistics_trackers/stathat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#track_count, #track_value

Constructor Details

#initialize(key, namespace = nil) ⇒ Stathat

Returns a new instance of Stathat.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
16
# File 'lib/nexaas/auditor/statistics_trackers/stathat.rb', line 8

def initialize(key, namespace=nil)
  @key = key.to_s
  @namespace = namespace.to_s
  @logger = Nexaas::Auditor.configuration.logger
  if Nexaas::Auditor.configuration.statistics_service == 'stathat'
    require 'stathat'
  end
  raise ArgumentError, "required Stathat EZ Key not found" if @key == ''
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



6
7
8
# File 'lib/nexaas/auditor/statistics_trackers/stathat.rb', line 6

def logger
  @logger
end