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
-
#blocking_behaviour_if_consent_not_given ⇒ Object
readonly
Returns the value of attribute blocking_behaviour_if_consent_not_given.
-
#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.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/kameleoon/configuration/settings.rb', line 19 def initialize(configuration = nil) if configuration.nil? @real_time_update = false @is_consent_required = false @blocking_behaviour_if_consent_not_given = ConsentBlockingBehaviour::PARTIALLY_BLOCKED @data_api_domain = nil else @real_time_update = configuration['realTimeUpdate'] || false @is_consent_required = configuration['consentType'] == 'REQUIRED' @blocking_behaviour_if_consent_not_given = ConsentBlockingBehaviour.from_str(configuration['consentOptOutBehavior']) @data_api_domain = configuration['dataApiDomain'] end end |
Instance Attribute Details
#blocking_behaviour_if_consent_not_given ⇒ Object (readonly)
Returns the value of attribute blocking_behaviour_if_consent_not_given.
12 13 14 |
# File 'lib/kameleoon/configuration/settings.rb', line 12 def @blocking_behaviour_if_consent_not_given end |
#data_api_domain ⇒ Object (readonly)
Returns the value of attribute data_api_domain.
12 13 14 |
# File 'lib/kameleoon/configuration/settings.rb', line 12 def data_api_domain @data_api_domain end |
#is_consent_required ⇒ Object (readonly)
Returns the value of attribute is_consent_required.
12 13 14 |
# File 'lib/kameleoon/configuration/settings.rb', line 12 def @is_consent_required end |
#real_time_update ⇒ Object
Returns the value of attribute real_time_update.
11 12 13 |
# File 'lib/kameleoon/configuration/settings.rb', line 11 def real_time_update @real_time_update end |
Instance Method Details
#to_s ⇒ Object
14 15 16 17 |
# File 'lib/kameleoon/configuration/settings.rb', line 14 def to_s "Settings{real_time_update:#{@real_time_update},is_consent_required:#{@is_consent_required}," \ "data_api_domain:#{@data_api_domain}}" end |