Class: Kameleoon::Configuration::Settings
- Inherits:
-
Object
- Object
- Kameleoon::Configuration::Settings
- Defined in:
- lib/kameleoon/configuration/settings.rb
Overview
KameleoonConfigurationSettings is used for saving setting’s parameters, e.g state of real time update for site code and etc
Instance Attribute Summary collapse
-
#data_api_domain ⇒ Object
readonly
Returns the value of attribute data_api_domain.
-
#is_consent_required ⇒ Object
readonly
Returns the value of attribute is_consent_required.
-
#real_time_update ⇒ Object
Returns the value of attribute real_time_update.
Instance Method Summary collapse
-
#initialize(configuration = nil) ⇒ Settings
constructor
A new instance of Settings.
- #to_s ⇒ Object
Constructor Details
#initialize(configuration = nil) ⇒ Settings
Returns a new instance of Settings.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/kameleoon/configuration/settings.rb', line 17 def initialize(configuration = nil) if configuration.nil? @real_time_update = false @is_consent_required = false @data_api_domain = nil else @real_time_update = configuration['realTimeUpdate'] || false @is_consent_required = configuration['consentType'] == 'REQUIRED' @data_api_domain = configuration['dataApiDomain'] end end |
Instance Attribute Details
#data_api_domain ⇒ Object (readonly)
Returns the value of attribute data_api_domain.
10 11 12 |
# File 'lib/kameleoon/configuration/settings.rb', line 10 def data_api_domain @data_api_domain end |
#is_consent_required ⇒ Object (readonly)
Returns the value of attribute is_consent_required.
10 11 12 |
# File 'lib/kameleoon/configuration/settings.rb', line 10 def @is_consent_required end |
#real_time_update ⇒ Object
Returns the value of attribute real_time_update.
9 10 11 |
# File 'lib/kameleoon/configuration/settings.rb', line 9 def real_time_update @real_time_update end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/kameleoon/configuration/settings.rb', line 12 def to_s "Settings{real_time_update:#{@real_time_update},is_consent_required:#{@is_consent_required}," \ "data_api_domain:#{@data_api_domain}}" end |