Class: Nexaas::Auditor::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nexaas/auditor/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
24
25
26
27
28
# File 'lib/nexaas/auditor/configuration.rb', line 19

def initialize
  @enabled = nil # set to true when configure is called
  @logger = nil
  @log_app_events = false
  @track_app_events = false
  @track_rails_events = false
  @statistics_namespace = nil
  @statistics_service = 'log' # or 'stathat'
  @stathat_settings = {key: nil}
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



7
8
9
# File 'lib/nexaas/auditor/configuration.rb', line 7

def enabled
  @enabled
end

#log_app_eventsObject

Returns the value of attribute log_app_events.



10
11
12
# File 'lib/nexaas/auditor/configuration.rb', line 10

def log_app_events
  @log_app_events
end

#loggerObject

Returns the value of attribute logger.



8
9
10
# File 'lib/nexaas/auditor/configuration.rb', line 8

def logger
  @logger
end

#stathat_settingsObject

Returns the value of attribute stathat_settings.



17
18
19
# File 'lib/nexaas/auditor/configuration.rb', line 17

def stathat_settings
  @stathat_settings
end

#statistics_namespaceObject

Returns the value of attribute statistics_namespace.



14
15
16
# File 'lib/nexaas/auditor/configuration.rb', line 14

def statistics_namespace
  @statistics_namespace
end

#statistics_serviceObject

Returns the value of attribute statistics_service.



15
16
17
# File 'lib/nexaas/auditor/configuration.rb', line 15

def statistics_service
  @statistics_service
end

#track_app_eventsObject

Returns the value of attribute track_app_events.



11
12
13
# File 'lib/nexaas/auditor/configuration.rb', line 11

def track_app_events
  @track_app_events
end

#track_rails_eventsObject

Returns the value of attribute track_rails_events.



12
13
14
# File 'lib/nexaas/auditor/configuration.rb', line 12

def track_rails_events
  @track_rails_events
end

Instance Method Details

#[](option) ⇒ Object

allow params to be read like a hash



31
32
33
# File 'lib/nexaas/auditor/configuration.rb', line 31

def [](option)
  send(option)
end