Class: ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp
- Inherits:
-
AnchoredRegexp
- Object
- Visitors::Visitor
- AnchoredRegexp
- ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp
- Defined in:
- lib/action_dispatch/journey/path/pattern.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Visitors::Visitor
Visitors::Visitor::DISPATCH_CACHE
Instance Method Summary collapse
Methods inherited from AnchoredRegexp
#initialize, #visit_CAT, #visit_GROUP, #visit_LITERAL, #visit_OR, #visit_SLASH, #visit_STAR, #visit_SYMBOL
Constructor Details
This class inherits a constructor from ActionDispatch::Journey::Path::Pattern::AnchoredRegexp
Instance Method Details
#accept(node) ⇒ Object
118 119 120 121 |
# File 'lib/action_dispatch/journey/path/pattern.rb', line 118 def accept(node) path = visit node path == "/" ? %r{\A/} : %r{\A#{path}(?:\b|\Z|/)} end |