Module: Kameleoon::Targeting::TreeBuilder Private

Includes:
ConditionFactory
Included in:
Segment
Defined in:
lib/kameleoon/targeting/tree_builder.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods included from ConditionFactory

#get_condition

Instance Method Details

#create_tree(conditions_data_json) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
17
# File 'lib/kameleoon/targeting/tree_builder.rb', line 9

def create_tree(conditions_data_json)
  if conditions_data_json.nil?
    return nil
  end
  if conditions_data_json['firstLevel'].empty?
    conditions_data_json['firstLevelOrOperators'] = []
  end
  create_first_level(conditions_data_json)
end