Sha256: 9d231f11dfc88f7b3718090136c568b375d1df7b95025b71a00f1c63b14cb56f

Contents?: true

Size: 515 Bytes

Versions: 1

Compression:

Stored size: 515 Bytes

Contents

module TodoNext
  class Tree

    class DepthFirstVisitorBase

      def visit(curr_node, level) #nodoc#
        if curr_node.terminal?
          process_terminal_node(curr_node, level)
        else
          process_non_terminal_node(curr_node, level)
        end
      end

      # overwrite in the concrete visitor class
      def process_terminal_node(curr_node, level)
      end

      # overwrite in the concrete visitor class
      def process_non_terminal_node(curr_node, level)
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
todo_next-0.0.1 lib/todo_next/tree/depth_first_visitor_base.rb