Class: Featureflip::Config
- Inherits:
-
Object
- Object
- Featureflip::Config
- Defined in:
- lib/featureflip/config.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#connect_timeout ⇒ Object
Returns the value of attribute connect_timeout.
-
#flush_batch_size ⇒ Object
Returns the value of attribute flush_batch_size.
-
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
-
#init_timeout ⇒ Object
Returns the value of attribute init_timeout.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#max_stream_retries ⇒ Object
Returns the value of attribute max_stream_retries.
-
#poll_interval ⇒ Object
Returns the value of attribute poll_interval.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#sdk_key ⇒ Object
Returns the value of attribute sdk_key.
-
#send_events ⇒ Object
Returns the value of attribute send_events.
-
#streaming ⇒ Object
Returns the value of attribute streaming.
Instance Method Summary collapse
-
#initialize(sdk_key: nil, base_url: "https://eval.featureflip.io", streaming: true, poll_interval: 30, flush_interval: 30, flush_batch_size: 100, init_timeout: 10, connect_timeout: 5, read_timeout: 10, max_stream_retries: 5, send_events: true, logger: nil) ⇒ Config
constructor
A new instance of Config.
- #validate! ⇒ Object
Constructor Details
#initialize(sdk_key: nil, base_url: "https://eval.featureflip.io", streaming: true, poll_interval: 30, flush_interval: 30, flush_batch_size: 100, init_timeout: 10, connect_timeout: 5, read_timeout: 10, max_stream_retries: 5, send_events: true, logger: nil) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/featureflip/config.rb', line 7 def initialize( sdk_key: nil, base_url: "https://eval.featureflip.io", streaming: true, poll_interval: 30, flush_interval: 30, flush_batch_size: 100, init_timeout: 10, connect_timeout: 5, read_timeout: 10, max_stream_retries: 5, send_events: true, logger: nil ) @sdk_key = sdk_key @base_url = base_url @streaming = streaming @poll_interval = poll_interval @flush_interval = flush_interval @flush_batch_size = flush_batch_size @init_timeout = init_timeout @connect_timeout = connect_timeout @read_timeout = read_timeout @max_stream_retries = max_stream_retries @send_events = send_events @logger = logger || default_logger validate! end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def base_url @base_url end |
#connect_timeout ⇒ Object
Returns the value of attribute connect_timeout.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def connect_timeout @connect_timeout end |
#flush_batch_size ⇒ Object
Returns the value of attribute flush_batch_size.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def flush_batch_size @flush_batch_size end |
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def flush_interval @flush_interval end |
#init_timeout ⇒ Object
Returns the value of attribute init_timeout.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def init_timeout @init_timeout end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def logger @logger end |
#max_stream_retries ⇒ Object
Returns the value of attribute max_stream_retries.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def max_stream_retries @max_stream_retries end |
#poll_interval ⇒ Object
Returns the value of attribute poll_interval.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def poll_interval @poll_interval end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def read_timeout @read_timeout end |
#sdk_key ⇒ Object
Returns the value of attribute sdk_key.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def sdk_key @sdk_key end |
#send_events ⇒ Object
Returns the value of attribute send_events.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def send_events @send_events end |
#streaming ⇒ Object
Returns the value of attribute streaming.
3 4 5 |
# File 'lib/featureflip/config.rb', line 3 def streaming @streaming end |
Instance Method Details
#validate! ⇒ Object
37 38 39 40 |
# File 'lib/featureflip/config.rb', line 37 def validate! finalize! validate_positive_fields! end |