Class: Lescopr::Configuration

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

Overview

─── Configuration ────────────────────────────────────────────────────────

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

Returns the value of attribute api_key.



126
127
128
# File 'lib/lescopr.rb', line 126

def api_key
  @api_key
end

#batch_sizeObject

Returns the value of attribute batch_size.



126
127
128
# File 'lib/lescopr.rb', line 126

def batch_size
  @batch_size
end

#debugObject

Returns the value of attribute debug.



126
127
128
# File 'lib/lescopr.rb', line 126

def debug
  @debug
end

#environmentObject

Returns the value of attribute environment.



126
127
128
# File 'lib/lescopr.rb', line 126

def environment
  @environment
end

#flush_intervalObject

Returns the value of attribute flush_interval.



126
127
128
# File 'lib/lescopr.rb', line 126

def flush_interval
  @flush_interval
end

#sdk_keyObject

Returns the value of attribute sdk_key.



126
127
128
# File 'lib/lescopr.rb', line 126

def sdk_key
  @sdk_key
end