Class: SessionVision::Config
- Inherits:
-
Object
- Object
- SessionVision::Config
- Defined in:
- lib/sessionvision/config.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
-
#flush_interval ⇒ Object
readonly
Returns the value of attribute flush_interval.
-
#flush_size ⇒ Object
readonly
Returns the value of attribute flush_size.
-
#gzip_threshold ⇒ Object
readonly
Returns the value of attribute gzip_threshold.
-
#ingest_host ⇒ Object
readonly
Returns the value of attribute ingest_host.
-
#max_retries ⇒ Object
readonly
Returns the value of attribute max_retries.
-
#on_error ⇒ Object
readonly
Returns the value of attribute on_error.
-
#project_token ⇒ Object
readonly
Returns the value of attribute project_token.
-
#retry_delays ⇒ Object
readonly
Returns the value of attribute retry_delays.
Instance Method Summary collapse
-
#initialize(project_token:, ingest_host: "https://app.sessionvision.com", flush_size: 10, flush_interval: 5, max_retries: 3, retry_delays: [1, 2, 4], gzip_threshold: 1024, debug: false, on_error: nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(project_token:, ingest_host: "https://app.sessionvision.com", flush_size: 10, flush_interval: 5, max_retries: 3, retry_delays: [1, 2, 4], gzip_threshold: 1024, debug: false, on_error: nil) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sessionvision/config.rb', line 8 def initialize( project_token:, ingest_host: "https://app.sessionvision.com", flush_size: 10, flush_interval: 5, max_retries: 3, retry_delays: [1, 2, 4], gzip_threshold: 1024, debug: false, on_error: nil ) raise ArgumentError, "project_token is required" if project_token.nil? || project_token.empty? @project_token = project_token @ingest_host = ingest_host.chomp("/") @flush_size = flush_size @flush_interval = flush_interval @max_retries = max_retries @retry_delays = retry_delays @gzip_threshold = gzip_threshold @debug = debug @on_error = on_error end |
Instance Attribute Details
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def debug @debug end |
#flush_interval ⇒ Object (readonly)
Returns the value of attribute flush_interval.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def flush_interval @flush_interval end |
#flush_size ⇒ Object (readonly)
Returns the value of attribute flush_size.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def flush_size @flush_size end |
#gzip_threshold ⇒ Object (readonly)
Returns the value of attribute gzip_threshold.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def gzip_threshold @gzip_threshold end |
#ingest_host ⇒ Object (readonly)
Returns the value of attribute ingest_host.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def ingest_host @ingest_host end |
#max_retries ⇒ Object (readonly)
Returns the value of attribute max_retries.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def max_retries @max_retries end |
#on_error ⇒ Object (readonly)
Returns the value of attribute on_error.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def on_error @on_error end |
#project_token ⇒ Object (readonly)
Returns the value of attribute project_token.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def project_token @project_token end |
#retry_delays ⇒ Object (readonly)
Returns the value of attribute retry_delays.
5 6 7 |
# File 'lib/sessionvision/config.rb', line 5 def retry_delays @retry_delays end |