diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:16:40 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:16:40 -0700 |
commit | eabe504cdfa11b580c614d6bd501eb7cc60f485d (patch) | |
tree | ea0895463e4c6b99e09640bfc5a6c69397744134 /actionpack/lib/action_dispatch/journey/router/strexp.rb | |
parent | 7da98d0a590d74027e6595da8a85ea3b4195c51c (diff) | |
download | rails-eabe504cdfa11b580c614d6bd501eb7cc60f485d.tar.gz rails-eabe504cdfa11b580c614d6bd501eb7cc60f485d.tar.bz2 rails-eabe504cdfa11b580c614d6bd501eb7cc60f485d.zip |
ask the strexp for the ast
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/router/strexp.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/strexp.rb | 5 |
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 |