123456789_123456789_123456789_123456789_123456789_

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

Instance Method Summary

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 ]

  
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 68

def binary(node)
  visit(node.left)
  visit(node.right)
end

#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