Class: Umwelt::Tree::Imprint
- Inherits:
-
Object
- Object
- Umwelt::Tree::Imprint
- Extended by:
- Forwardable
- Includes:
- Hanami::Interactor
- Defined in:
- lib/umwelt/tree/imprint.rb
Instance Method Summary collapse
- #call(semantic_name) ⇒ Object
-
#initialize(trunk, location: nil) ⇒ Imprint
constructor
A new instance of Imprint.
Constructor Details
#initialize(trunk, location: nil) ⇒ Imprint
Returns a new instance of Imprint.
11 12 13 14 15 |
# File 'lib/umwelt/tree/imprint.rb', line 11 def initialize(trunk, location: nil) @trunk = trunk @location = location @written_paths = {} end |
Instance Method Details
#call(semantic_name) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/umwelt/tree/imprint.rb', line 17 def call(semantic_name) error! not_clean unless location_clean? @trunk.nodes.map do |node| write node.semantic(semantic_name) end end |