Class: Optimizely::Helpers::OptimizelySdkSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/optimizely/helpers/sdk_settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(disable_odp: false, segments_cache_size: Constants::ODP_SEGMENTS_CACHE_CONFIG[:DEFAULT_CAPACITY], segments_cache_timeout_in_secs: Constants::ODP_SEGMENTS_CACHE_CONFIG[:DEFAULT_TIMEOUT_SECONDS], odp_segments_cache: nil, odp_segment_manager: nil, odp_event_manager: nil, odp_segment_request_timeout: nil, odp_event_request_timeout: nil, odp_event_flush_interval: nil, cmab_prediction_endpoint: nil) ⇒ OptimizelySdkSettings

Contains configuration used for Optimizely Project initialization.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/optimizely/helpers/sdk_settings.rb', line 39

def initialize(
  disable_odp: false,
  segments_cache_size: Constants::ODP_SEGMENTS_CACHE_CONFIG[:DEFAULT_CAPACITY],
  segments_cache_timeout_in_secs: Constants::ODP_SEGMENTS_CACHE_CONFIG[:DEFAULT_TIMEOUT_SECONDS],
  odp_segments_cache: nil,
  odp_segment_manager: nil,
  odp_event_manager: nil,
  odp_segment_request_timeout: nil,
  odp_event_request_timeout: nil,
  odp_event_flush_interval: nil,
  cmab_prediction_endpoint: nil
)
  @odp_disabled = disable_odp
  @segments_cache_size = segments_cache_size
  @segments_cache_timeout_in_secs = segments_cache_timeout_in_secs
  @odp_segments_cache = odp_segments_cache
  @odp_segment_manager = odp_segment_manager
  @odp_event_manager = odp_event_manager
  @fetch_segments_timeout = odp_segment_request_timeout
  @odp_event_timeout = odp_event_request_timeout
  @odp_flush_interval = odp_event_flush_interval
  @cmab_prediction_endpoint = cmab_prediction_endpoint
end

Instance Attribute Details

#cmab_prediction_endpointObject

Returns the value of attribute cmab_prediction_endpoint.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def cmab_prediction_endpoint
  @cmab_prediction_endpoint
end

#fetch_segments_timeoutObject

Returns the value of attribute fetch_segments_timeout.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def fetch_segments_timeout
  @fetch_segments_timeout
end

#odp_disabledObject

Returns the value of attribute odp_disabled.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_disabled
  @odp_disabled
end

#odp_event_managerObject

Returns the value of attribute odp_event_manager.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_event_manager
  @odp_event_manager
end

#odp_event_timeoutObject

Returns the value of attribute odp_event_timeout.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_event_timeout
  @odp_event_timeout
end

#odp_flush_intervalObject

Returns the value of attribute odp_flush_interval.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_flush_interval
  @odp_flush_interval
end

#odp_segment_managerObject

Returns the value of attribute odp_segment_manager.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_segment_manager
  @odp_segment_manager
end

#odp_segments_cacheObject

Returns the value of attribute odp_segments_cache.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def odp_segments_cache
  @odp_segments_cache
end

#segments_cache_sizeObject

Returns the value of attribute segments_cache_size.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def segments_cache_size
  @segments_cache_size
end

#segments_cache_timeout_in_secsObject

Returns the value of attribute segments_cache_timeout_in_secs.



24
25
26
# File 'lib/optimizely/helpers/sdk_settings.rb', line 24

def segments_cache_timeout_in_secs
  @segments_cache_timeout_in_secs
end