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.



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

def initialize
  @real_time_update = false
  @is_consent_required = false
  @data_api_domain = nil
end

Instance Attribute Details

#data_api_domainObject (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

Returns the value of attribute is_consent_required.



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

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



18
19
20
21
22
# File 'lib/kameleoon/configuration/settings.rb', line 18

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