Class: Kameleoon::Managers::Data::DataManager::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/kameleoon/managers/data/data_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_file) ⇒ Container

Returns a new instance of Container.



26
27
28
29
30
31
# File 'lib/kameleoon/managers/data/data_manager.rb', line 26

def initialize(data_file)
  @data_file = data_file
  # Regarding GDPR policy we should set visitorCode if legal consent isn't required or we have at
  # least one Targeted Delivery rule in datafile
  @visitor_code_managed = data_file.settings.is_consent_required && !data_file.has_any_targeted_delivery_rule
end

Instance Attribute Details

#data_fileObject (readonly)

Returns the value of attribute data_file.



24
25
26
# File 'lib/kameleoon/managers/data/data_manager.rb', line 24

def data_file
  @data_file
end

#visitor_code_managedObject (readonly)

Returns the value of attribute visitor_code_managed.



24
25
26
# File 'lib/kameleoon/managers/data/data_manager.rb', line 24

def visitor_code_managed
  @visitor_code_managed
end