Class: Itly::Plugin::Iteratively::Options
- Inherits:
-
Object
- Object
- Itly::Plugin::Iteratively::Options
- Defined in:
- lib/itly/plugin/iteratively/options.rb
Overview
Options for the Iteratively plugin class
Constant Summary collapse
- DEFAULT_URL =
'https://data.us-east-2.iterative.ly/t'
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#flush_interval_ms ⇒ Object
readonly
Returns the value of attribute flush_interval_ms.
-
#flush_queue_size ⇒ Object
readonly
Returns the value of attribute flush_queue_size.
-
#max_retries ⇒ Object
readonly
Returns the value of attribute max_retries.
-
#omit_values ⇒ Object
readonly
Returns the value of attribute omit_values.
-
#retry_delay_max ⇒ Object
readonly
Returns the value of attribute retry_delay_max.
-
#retry_delay_min ⇒ Object
readonly
Returns the value of attribute retry_delay_min.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(url: DEFAULT_URL, disabled: nil, flush_queue_size: 10, batch_size: 100, flush_interval_ms: 1_000, max_retries: 25, retry_delay_min: 10.0, retry_delay_max: 3600.0, omit_values: false, branch: nil, version: nil) ⇒ Options
constructor
Instantiate a new Options.
-
#with_overrides(url: nil, disabled: nil, flush_queue_size: nil, batch_size: nil, flush_interval_ms: nil, max_retries: nil, retry_delay_min: nil, retry_delay_max: nil, omit_values: nil, branch: nil, version: nil) ⇒ Object
Returns a copy of this Options with any provided arguments used as overrides.
Constructor Details
#initialize(url: DEFAULT_URL, disabled: nil, flush_queue_size: 10, batch_size: 100, flush_interval_ms: 1_000, max_retries: 25, retry_delay_min: 10.0, retry_delay_max: 3600.0, omit_values: false, branch: nil, version: nil) ⇒ Options
Instantiate a new Options
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/itly/plugin/iteratively/options.rb', line 37 def initialize( url: DEFAULT_URL, disabled: nil, flush_queue_size: 10, batch_size: 100, flush_interval_ms: 1_000, max_retries: 25, retry_delay_min: 10.0, retry_delay_max: 3600.0, omit_values: false, branch: nil, version: nil ) super() @url = url @disabled = disabled @flush_queue_size = flush_queue_size @batch_size = batch_size @flush_interval_ms = flush_interval_ms @max_retries = max_retries @retry_delay_min = retry_delay_min @retry_delay_max = retry_delay_max @omit_values = omit_values @branch = branch @version = version end |
Instance Attribute Details
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def batch_size @batch_size end |
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def branch @branch end |
#disabled ⇒ Object (readonly)
Returns the value of attribute disabled.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def disabled @disabled end |
#flush_interval_ms ⇒ Object (readonly)
Returns the value of attribute flush_interval_ms.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def flush_interval_ms @flush_interval_ms end |
#flush_queue_size ⇒ Object (readonly)
Returns the value of attribute flush_queue_size.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def flush_queue_size @flush_queue_size end |
#max_retries ⇒ Object (readonly)
Returns the value of attribute max_retries.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def max_retries @max_retries end |
#omit_values ⇒ Object (readonly)
Returns the value of attribute omit_values.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def omit_values @omit_values end |
#retry_delay_max ⇒ Object (readonly)
Returns the value of attribute retry_delay_max.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def retry_delay_max @retry_delay_max end |
#retry_delay_min ⇒ Object (readonly)
Returns the value of attribute retry_delay_min.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def retry_delay_min @retry_delay_min end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def url @url end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
14 15 16 |
# File 'lib/itly/plugin/iteratively/options.rb', line 14 def version @version end |
Instance Method Details
#with_overrides(url: nil, disabled: nil, flush_queue_size: nil, batch_size: nil, flush_interval_ms: nil, max_retries: nil, retry_delay_min: nil, retry_delay_max: nil, omit_values: nil, branch: nil, version: nil) ⇒ Object
Returns a copy of this Options with any provided arguments used as overrides
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/itly/plugin/iteratively/options.rb', line 58 def with_overrides( url: nil, disabled: nil, flush_queue_size: nil, batch_size: nil, flush_interval_ms: nil, max_retries: nil, retry_delay_min: nil, retry_delay_max: nil, omit_values: nil, branch: nil, version: nil ) Itly::Plugin::Iteratively::Options.new( url: url.nil? ? @url : url, disabled: disabled.nil? ? @disabled : disabled, flush_queue_size: flush_queue_size.nil? ? @flush_queue_size : flush_queue_size, batch_size: batch_size.nil? ? @batch_size : batch_size, flush_interval_ms: flush_interval_ms.nil? ? @flush_interval_ms : flush_interval_ms, max_retries: max_retries.nil? ? @max_retries : max_retries, retry_delay_min: retry_delay_min.nil? ? @retry_delay_min : retry_delay_min, retry_delay_max: retry_delay_max.nil? ? @retry_delay_max : retry_delay_max, omit_values: omit_values.nil? ? @omit_values : omit_values, branch: branch.nil? ? @branch : branch, version: version.nil? ? @version : version ) end |