Class: Umwelt::Tree::Fill

Inherits:
Object
  • Object
show all
Defined in:
lib/umwelt/tree/fill.rb

Instance Method Summary collapse

Constructor Details

#initializeFill

Returns a new instance of Fill.



5
6
7
8
# File 'lib/umwelt/tree/fill.rb', line 5

def initialize
  @index = {}
  @childs_ids = {}
end

Instance Method Details

#call(fragments) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/umwelt/tree/fill.rb', line 10

def call(fragments)
  fragments.each do |fragment|
    add_to_index(fragment)
    register_as_child(fragment)
  end
  fill_trunk
end