Sha256: 3e55a47ee1c53496f9077ff7043281f1395eb7d6f0995f73c8adf1194391b157
Contents?: true
Size: 482 Bytes
Versions: 16
Compression:
Stored size: 482 Bytes
Contents
require 'glimmer/xml/node' module Glimmer module XML class DepthFirstSearchIterator def initialize(node, node_visitor) @node = node @node_visitor = node_visitor end def iterate process(@node) end def process(node) @node_visitor.process_before_children(node) node.children.each { |child| process(child) } if node.is_a?(Node) @node_visitor.process_after_children(node) end end end end
Version data entries
16 entries across 16 versions & 3 rubygems