Class: Abstractivator::Trees::TransformTreeClosure

Inherits:
Object
  • Object
show all
Defined in:
lib/abstractivator/trees/tree_map.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ TransformTreeClosure

Returns a new instance of TransformTreeClosure.



22
23
24
25
26
# File 'lib/abstractivator/trees/tree_map.rb', line 22

def initialize(config)
  @config = config
  @bias = 0 # symbol = +, string = -
  @no_value = Object.new
end

Instance Method Details

#do_obj(obj, path_tree) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/abstractivator/trees/tree_map.rb', line 28

def do_obj(obj, path_tree)
  case obj
    when nil; nil
    when Array; do_array(obj, path_tree)
    else; do_hash(obj, path_tree)
  end
end