Class: Kameleoon::Configuration::Settings

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeSettings

Returns a new instance of Settings.



11
12
13
14
# File 'lib/kameleoon/configuration/settings.rb', line 11

def initialize
  @real_time_update = false
  @is_consent_required = false
end

Instance Attribute Details

Returns the value of attribute is_consent_required.



9
10
11
# File 'lib/kameleoon/configuration/settings.rb', line 9

def is_consent_required
  @is_consent_required
end

#real_time_updateObject

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

#update(configuration) ⇒ Object



16
17
18
19
# File 'lib/kameleoon/configuration/settings.rb', line 16

def update(configuration)
  @real_time_update = configuration['realTimeUpdate'] || false
  @is_consent_required = configuration['consentType'] == 'REQUIRED'
end