aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/testing
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-08 01:05:28 +0200
committerXavier Noria <fxn@hashref.com>2016-08-08 01:12:38 +0200
commita9dc45459abcd9437085f4dd0aa3c9d0e64e062f (patch)
treefe160bcd744ad3dffbe901a4b44df2c2343130de /railties/lib/rails/generators/testing
parentb45c9ca9b6571108242c1dfc3d3e160f56baf025 (diff)
downloadrails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.gz
rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.bz2
rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.zip
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.
Diffstat (limited to 'railties/lib/rails/generators/testing')
-rw-r--r--railties/lib/rails/generators/testing/behaviour.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/testing/behaviour.rb b/railties/lib/rails/generators/testing/behaviour.rb
index fc91482d3b..a1e5a233b9 100644
--- a/railties/lib/rails/generators/testing/behaviour.rb
+++ b/railties/lib/rails/generators/testing/behaviour.rb
@@ -62,16 +62,16 @@ module Rails
#
# You can provide a configuration hash as second argument. This method returns the output
# printed by the generator.
- def run_generator(args=self.default_arguments, config={})
+ def run_generator(args = default_arguments, config = {})
capture(:stdout) do
args += ["--skip-bundle"] unless args.include? "--dev"
- self.generator_class.start(args, config.reverse_merge(destination_root: destination_root))
+ generator_class.start(args, config.reverse_merge(destination_root: destination_root))
end
end
# Instantiate the generator.
- def generator(args=self.default_arguments, options={}, config={})
- @generator ||= self.generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
+ def generator(args = default_arguments, options = {}, config = {})
+ @generator ||= generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
end
# Create a Rails::Generators::GeneratedAttribute by supplying the