Class: Umwelt::Tree::Imprint

Inherits:
Abstract::Interactor show all
Defined in:
lib/umwelt/tree/imprint.rb

Instance Method Summary collapse

Methods inherited from Abstract::Interactor

#prove

Constructor Details

#initialize(trunk, location: nil) ⇒ Imprint

Returns a new instance of Imprint.



7
8
9
10
11
# File 'lib/umwelt/tree/imprint.rb', line 7

def initialize(trunk, location: nil)
  @trunk = trunk
  @location = location
  @written_paths = {}
end

Instance Method Details

#call(semantic_name) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/umwelt/tree/imprint.rb', line 13

def call(semantic_name)
  error! not_clean unless location_clean?

  @trunk.nodes.map do |node|
    write node.semantic(semantic_name)
  end
end