From a9dc45459abcd9437085f4dd0aa3c9d0e64e062f Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 8 Aug 2016 01:05:28 +0200 Subject: code gardening: removes redundant selfs A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required. --- railties/lib/rails/generators/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/generators/base.rb') diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 60ef2d50ef..5b4cde30c0 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -48,7 +48,7 @@ module Rails # Convenience method to hide this generator from the available ones when # running rails generator command. def self.hide! - Rails::Generators.hide_namespace self.namespace + Rails::Generators.hide_namespace(namespace) end # Invoke a generator based on the value supplied by the user to the @@ -273,7 +273,7 @@ module Rails # Use Rails default banner. def self.banner - "rails generate #{namespace.sub(/^rails:/,'')} #{self.arguments.map(&:usage).join(' ')} [options]".gsub(/\s+/, " ") + "rails generate #{namespace.sub(/^rails:/,'')} #{arguments.map(&:usage).join(' ')} [options]".gsub(/\s+/, " ") end # Sets the base_name taking into account the current class namespace. -- cgit v1.2.3