Class: ActionDispatch::Journey::Visitors::FormatBuilder
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Visitor
|
|
Instance Chain:
self,
Visitor
|
|
Inherits: |
ActionDispatch::Journey::Visitors::Visitor
|
Defined in: | actionpack/lib/action_dispatch/journey/visitors.rb |
Constant Summary
Visitor
- Inherited
Instance Method Summary
Visitor
- Inherited
Instance Method Details
#accept(node)
[ GitHub ]#binary(node)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 140
def binary(node) visit(node.left) + visit(node.right) end
#terminal(node)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 138
def terminal(node); [node.left]; end
#visit_GROUP(n)
[ GitHub ]#visit_STAR(n)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 146
def visit_STAR(n) [Journey::Format.required_path(n.left.to_sym)] end
#visit_SYMBOL(n)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 150
def visit_SYMBOL(n) symbol = n.to_sym if symbol == :controller [Journey::Format.required_path(symbol)] else [Journey::Format.required_segment(symbol)] end end