diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-13 15:16:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-13 15:16:25 -0700 |
commit | 4868692687f2904d2a02c1d6cd09882b6916cc5f (patch) | |
tree | 7c76897c944e5d02e2c0b34f02d7d01e404b8cdc /actionpack/lib/action_dispatch/journey/router | |
parent | 36f26fd47ecff07f229264560a68fca0d59911ca (diff) | |
download | rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.tar.gz rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.tar.bz2 rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.zip |
pass anchor directly to `Pattern`
the caller already has it, there is no reason to pack it in to an object
and just throw that object away.
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/router')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/strexp.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/strexp.rb b/actionpack/lib/action_dispatch/journey/router/strexp.rb index 4b7738f335..53630ea87b 100644 --- a/actionpack/lib/action_dispatch/journey/router/strexp.rb +++ b/actionpack/lib/action_dispatch/journey/router/strexp.rb @@ -6,20 +6,19 @@ module ActionDispatch alias :compile :new end - attr_reader :path, :requirements, :separators, :anchor, :ast + attr_reader :path, :requirements, :separators, :ast - def self.build(path, requirements, separators, anchor = true) + def self.build(path, requirements, separators) parser = Journey::Parser.new ast = parser.parse path - new ast, path, requirements, separators, anchor + new ast, path, requirements, separators end - def initialize(ast, path, requirements, separators, anchor = true) + def initialize(ast, path, requirements, separators) @ast = ast @path = path @requirements = requirements @separators = separators - @anchor = anchor end end end |