Class: Callcounter::Configuration

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

Overview

configuration class for Callcounter middleware

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
16
# File 'lib/callcounter/configuration.rb', line 8

def initialize
  @debug = false
  @project_token = nil
  @app_token = nil
  @track = lambda { |request|
    return request.hostname.start_with?('api') || request.path.start_with?('/api')
  }
  @async = true
end

Instance Attribute Details

#app_tokenObject

Returns the value of attribute app_token.



6
7
8
# File 'lib/callcounter/configuration.rb', line 6

def app_token
  @app_token
end

#asyncObject

Returns the value of attribute async.



6
7
8
# File 'lib/callcounter/configuration.rb', line 6

def async
  @async
end

#debugObject

Returns the value of attribute debug.



6
7
8
# File 'lib/callcounter/configuration.rb', line 6

def debug
  @debug
end

#project_tokenObject

Returns the value of attribute project_token.



6
7
8
# File 'lib/callcounter/configuration.rb', line 6

def project_token
  @project_token
end

#trackObject

Returns the value of attribute track.



6
7
8
# File 'lib/callcounter/configuration.rb', line 6

def track
  @track
end