Class: ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp

Inherits:
AnchoredRegexp show all
Defined in:
actionpack/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


121
122
123
124
# File 'actionpack/lib/action_dispatch/journey/path/pattern.rb', line 121

def accept(node)
  path = visit node
  path == "/" ? %r{\A/} : %r{\A#{path}(?:\b|\Z|/)}
end