diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-29 01:05:58 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-29 01:17:49 -0200 |
commit | fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2 (patch) | |
tree | 49257bdeadca12d5b167800a25d58dd50c0d6ddb /actionview/lib/action_view/template | |
parent | f81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f (diff) | |
download | rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.gz rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.bz2 rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.zip |
Add more rubocop rules about whitespaces
Diffstat (limited to 'actionview/lib/action_view/template')
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 5a2948d5a9..ed93ebc027 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -141,13 +141,13 @@ module ActionView end # Normalizes the arguments and passes it on to find_templates. - def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[]) + def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) cached(key, [name, prefix, partial], details, locals) do find_templates(name, prefix, partial, details) end end - def find_all_anywhere(name, prefix, partial=false, details={}, key=nil, locals=[]) + def find_all_anywhere(name, prefix, partial = false, details = {}, key = nil, locals = []) cached(key, [name, prefix, partial], details, locals) do find_templates(name, prefix, partial, details, true) end @@ -207,7 +207,7 @@ module ActionView EXTENSIONS = { locale: ".", formats: ".", variants: "+", handlers: "." } DEFAULT_PATTERN = ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:handlers,}" - def initialize(pattern=nil) + def initialize(pattern = nil) @pattern = pattern || DEFAULT_PATTERN super() end @@ -297,7 +297,7 @@ module ActionView handler = Template.handler_for_extension(extension) format, variant = pieces.last.split(EXTENSIONS[:variants], 2) if pieces.last - format &&= Template::Types[format] + format &&= Template::Types[format] [handler, format, variant] end @@ -342,7 +342,7 @@ module ActionView # * <tt>:handlers</tt> - possible handlers (for example erb, haml, builder...) # class FileSystemResolver < PathResolver - def initialize(path, pattern=nil) + def initialize(path, pattern = nil) raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver) super(pattern) @path = File.expand_path(path) |