Class: Callcounter::Configuration
- Inherits:
-
Object
- Object
- Callcounter::Configuration
- Defined in:
- lib/callcounter/configuration.rb
Overview
configuration class for Callcounter middleware
Instance Attribute Summary collapse
-
#app_token ⇒ Object
Returns the value of attribute app_token.
-
#async ⇒ Object
Returns the value of attribute async.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#project_token ⇒ Object
Returns the value of attribute project_token.
-
#track ⇒ Object
Returns the value of attribute track.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_token ⇒ Object
Returns the value of attribute app_token.
6 7 8 |
# File 'lib/callcounter/configuration.rb', line 6 def app_token @app_token end |
#async ⇒ Object
Returns the value of attribute async.
6 7 8 |
# File 'lib/callcounter/configuration.rb', line 6 def async @async end |
#debug ⇒ Object
Returns the value of attribute debug.
6 7 8 |
# File 'lib/callcounter/configuration.rb', line 6 def debug @debug end |
#project_token ⇒ Object
Returns the value of attribute project_token.
6 7 8 |
# File 'lib/callcounter/configuration.rb', line 6 def project_token @project_token end |
#track ⇒ Object
Returns the value of attribute track.
6 7 8 |
# File 'lib/callcounter/configuration.rb', line 6 def track @track end |