Module | HTree::Container::Loc |
In: |
htree/loc.rb
htree/modules.rb |
subst_subnode returns the location which refers the substituted tree.
loc.subst_subnode(pairs) -> loc t = HTree('<a><b><c>') l = t.make_loc.get_subnode(0, 0) l = l.subst_subnode({0=>HTree('<z/>')}) pp t, l.top.to_node # => #<HTree::Doc {elem <a> {elem <b> {emptyelem <c>}}}> #<HTree::Doc {elem <a> {elem <b> {emptyelem <z>}}}>