Class: ActionDispatch::Journey::Visitors::Visitor
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | actionpack/lib/action_dispatch/journey/visitors.rb |
Constant Summary
-
DISPATCH_CACHE =
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 57{}
Instance Method Summary
- #accept(node)
- #binary(node) private
- #nary(node) private
- #terminal(node) private
- #unary(node) private
- #visit(node) private
- #visit_CAT(n) private
- #visit_DOT(n) private
- #visit_GROUP(n) private
- #visit_LITERAL(n) private
- #visit_OR(n) private
- #visit_SLASH(n) private
- #visit_STAR(n) private
- #visit_SYMBOL(n) private
Instance Method Details
#accept(node)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 59
def accept(node) visit(node) end
#binary(node) (private)
[ GitHub ]#nary(node) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 74
def nary(node) node.children.each { |c| visit(c) } end
#terminal(node) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 85
def terminal(node); end
#unary(node) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 79
def unary(node) visit(node.left) end
#visit(node) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 64
def visit(node) send(DISPATCH_CACHE[node.type], node) end
#visit_CAT(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 72
def visit_CAT(n); binary(n); end
#visit_DOT(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 89
def visit_DOT(n); terminal(n); end
#visit_GROUP(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 82
def visit_GROUP(n); unary(n); end
#visit_LITERAL(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 86
def visit_LITERAL(n); terminal(n); end
#visit_OR(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 77
def visit_OR(n); nary(n); end
#visit_SLASH(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 88
def visit_SLASH(n); terminal(n); end
#visit_STAR(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 83
def visit_STAR(n); unary(n); end
#visit_SYMBOL(n) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 87
def visit_SYMBOL(n); terminal(n); end