I recently found myself writing the following:
task :spec do |t, args| require_relative 'spec/helper' helper = Library::Specs::Helper helper.start_coverage if condition helper.do_something(foo) else arr.each do |el| helper.do_something(el) end end end
My question is: is it bad practice to assign the name of a class to a variable to save space? Clearly, it makes the code much terser and readable. Are there any downsides?