Sha256: 987bc696410c0100b69b99f689155d0222ee5f4e34661c78640f3bc75b0dd9a2
Contents?: true
Size: 371 Bytes
Versions: 13
Compression:
Stored size: 371 Bytes
Contents
# -*- coding: utf-8 -*- module TreeRb # # It calls a block when visit a tree_node or leaf_node # class BlockTreeNodeVisitor < BasicTreeNodeVisitor def initialize( &action ) @block = action end def enter_node( tree_node ) @block.call( tree_node ) end def visit_leaf( leaf_node ) @block.call( leaf_node ) end end end
Version data entries
13 entries across 13 versions & 1 rubygems