Class: StatsigOptions
- Inherits:
-
Object
- Object
- StatsigOptions
- Defined in:
- lib/statsig_options.rb
Instance Attribute Summary collapse
-
#api_url_base ⇒ Object
Returns the value of attribute api_url_base.
-
#bootstrap_values ⇒ Object
Returns the value of attribute bootstrap_values.
-
#data_store ⇒ Object
Returns the value of attribute data_store.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#idlists_sync_interval ⇒ Object
Returns the value of attribute idlists_sync_interval.
-
#local_mode ⇒ Object
Returns the value of attribute local_mode.
-
#logging_interval_seconds ⇒ Object
Returns the value of attribute logging_interval_seconds.
-
#logging_max_buffer_size ⇒ Object
Returns the value of attribute logging_max_buffer_size.
-
#rules_updated_callback ⇒ Object
Returns the value of attribute rules_updated_callback.
-
#rulesets_sync_interval ⇒ Object
Returns the value of attribute rulesets_sync_interval.
Instance Method Summary collapse
-
#initialize(environment = nil, api_url_base = 'https://statsigapi.net/v1', rulesets_sync_interval: 10, idlists_sync_interval: 60, logging_interval_seconds: 60, logging_max_buffer_size: 1000, local_mode: false, bootstrap_values: nil, rules_updated_callback: nil, data_store: nil) ⇒ StatsigOptions
constructor
A new instance of StatsigOptions.
Constructor Details
#initialize(environment = nil, api_url_base = 'https://statsigapi.net/v1', rulesets_sync_interval: 10, idlists_sync_interval: 60, logging_interval_seconds: 60, logging_max_buffer_size: 1000, local_mode: false, bootstrap_values: nil, rules_updated_callback: nil, data_store: nil) ⇒ StatsigOptions
Returns a new instance of StatsigOptions.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/statsig_options.rb', line 13 def initialize( environment=nil, api_url_base='https://statsigapi.net/v1', rulesets_sync_interval: 10, idlists_sync_interval: 60, logging_interval_seconds: 60, logging_max_buffer_size: 1000, local_mode: false, bootstrap_values: nil, rules_updated_callback: nil, data_store: nil) @environment = environment.is_a?(Hash) ? environment : nil @api_url_base = api_url_base @rulesets_sync_interval = rulesets_sync_interval @idlists_sync_interval = idlists_sync_interval @logging_interval_seconds = logging_interval_seconds @logging_max_buffer_size = [logging_max_buffer_size, 1000].min @local_mode = local_mode @bootstrap_values = bootstrap_values @rules_updated_callback = rules_updated_callback @data_store = data_store end |
Instance Attribute Details
#api_url_base ⇒ Object
Returns the value of attribute api_url_base.
3 4 5 |
# File 'lib/statsig_options.rb', line 3 def api_url_base @api_url_base end |
#bootstrap_values ⇒ Object
Returns the value of attribute bootstrap_values.
9 10 11 |
# File 'lib/statsig_options.rb', line 9 def bootstrap_values @bootstrap_values end |
#data_store ⇒ Object
Returns the value of attribute data_store.
11 12 13 |
# File 'lib/statsig_options.rb', line 11 def data_store @data_store end |
#environment ⇒ Object
Returns the value of attribute environment.
2 3 4 |
# File 'lib/statsig_options.rb', line 2 def environment @environment end |
#idlists_sync_interval ⇒ Object
Returns the value of attribute idlists_sync_interval.
5 6 7 |
# File 'lib/statsig_options.rb', line 5 def idlists_sync_interval @idlists_sync_interval end |
#local_mode ⇒ Object
Returns the value of attribute local_mode.
8 9 10 |
# File 'lib/statsig_options.rb', line 8 def local_mode @local_mode end |
#logging_interval_seconds ⇒ Object
Returns the value of attribute logging_interval_seconds.
6 7 8 |
# File 'lib/statsig_options.rb', line 6 def logging_interval_seconds @logging_interval_seconds end |
#logging_max_buffer_size ⇒ Object
Returns the value of attribute logging_max_buffer_size.
7 8 9 |
# File 'lib/statsig_options.rb', line 7 def logging_max_buffer_size @logging_max_buffer_size end |
#rules_updated_callback ⇒ Object
Returns the value of attribute rules_updated_callback.
10 11 12 |
# File 'lib/statsig_options.rb', line 10 def rules_updated_callback @rules_updated_callback end |
#rulesets_sync_interval ⇒ Object
Returns the value of attribute rulesets_sync_interval.
4 5 6 |
# File 'lib/statsig_options.rb', line 4 def rulesets_sync_interval @rulesets_sync_interval end |