Class: Lescopr::Configuration
- Inherits:
-
Object
- Object
- Lescopr::Configuration
- Defined in:
- lib/lescopr.rb
Overview
─── Configuration ────────────────────────────────────────────────────────
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
-
#sdk_key ⇒ Object
Returns the value of attribute sdk_key.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
128 129 130 131 132 133 134 135 |
# File 'lib/lescopr.rb', line 128 def initialize @sdk_key = ENV["LESCOPR_SDK_KEY"] @api_key = ENV["LESCOPR_API_KEY"] @environment = ENV.fetch("LESCOPR_ENVIRONMENT", "development") @debug = ENV["LESCOPR_DEBUG"] == "true" @batch_size = 50 @flush_interval = 5 # seconds end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def api_key @api_key end |
#batch_size ⇒ Object
Returns the value of attribute batch_size.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def batch_size @batch_size end |
#debug ⇒ Object
Returns the value of attribute debug.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def debug @debug end |
#environment ⇒ Object
Returns the value of attribute environment.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def environment @environment end |
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def flush_interval @flush_interval end |
#sdk_key ⇒ Object
Returns the value of attribute sdk_key.
126 127 128 |
# File 'lib/lescopr.rb', line 126 def sdk_key @sdk_key end |