aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/router/strexp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/router/strexp.rb')
-rw-r--r--actionpack/lib/action_dispatch/journey/router/strexp.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/strexp.rb b/actionpack/lib/action_dispatch/journey/router/strexp.rb
index f97f1a223e..161b41d6b2 100644
--- a/actionpack/lib/action_dispatch/journey/router/strexp.rb
+++ b/actionpack/lib/action_dispatch/journey/router/strexp.rb
@@ -15,6 +15,11 @@ module ActionDispatch
@anchor = anchor
end
+ def ast
+ parser = Journey::Parser.new
+ parser.parse path
+ end
+
def names
@path.scan(/:\w+/).map { |s| s.tr(':', '') }
end