class Umwelt::Tree::Trunk

Public Instance Methods

childs(id) click to toggle source
# File lib/umwelt/tree/trunk.rb, line 17
def childs(id)
  childs_ids[id].map { |child_id| node(child_id) }
end
node(id) click to toggle source
# File lib/umwelt/tree/trunk.rb, line 13
def node(id)
  builder.call(index[id])
end
nodes() click to toggle source
# File lib/umwelt/tree/trunk.rb, line 7
def nodes
  index
    .values
    .map { |fragment| builder.call(fragment) }
end

Private Instance Methods

builder() click to toggle source
# File lib/umwelt/tree/trunk.rb, line 23
def builder
  @builder ||= Umwelt::Node::Build.new(self)
end