Class: RollbarConfig
- Inherits:
-
Object
- Object
- RollbarConfig
- Defined in:
- lib/production_toolkit/rollbar_configurator.rb
Instance Attribute Summary collapse
-
#client_token ⇒ Object
readonly
Returns the value of attribute client_token.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#server_token ⇒ Object
readonly
Returns the value of attribute server_token.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(config) ⇒ RollbarConfig
constructor
A new instance of RollbarConfig.
Constructor Details
#initialize(config) ⇒ RollbarConfig
Returns a new instance of RollbarConfig.
6 7 8 9 10 11 12 13 |
# File 'lib/production_toolkit/rollbar_configurator.rb', line 6 def initialize(config) @enabled = config.fetch(:enabled, false) if enabled? @server_token = config.fetch(:server_token) @client_token = config.fetch(:client_token) @environment = config.fetch(:environment) end end |
Instance Attribute Details
#client_token ⇒ Object (readonly)
Returns the value of attribute client_token.
4 5 6 |
# File 'lib/production_toolkit/rollbar_configurator.rb', line 4 def client_token @client_token end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
4 5 6 |
# File 'lib/production_toolkit/rollbar_configurator.rb', line 4 def environment @environment end |
#server_token ⇒ Object (readonly)
Returns the value of attribute server_token.
4 5 6 |
# File 'lib/production_toolkit/rollbar_configurator.rb', line 4 def server_token @server_token end |
Instance Method Details
#enabled? ⇒ Boolean
15 16 17 |
# File 'lib/production_toolkit/rollbar_configurator.rb', line 15 def enabled? @enabled end |