app/helpers/importers_helper.rb
Method has too many lines. [11/10] Open
Open
def self.define_options_method_for(constant_name)
method_name = constant_name.downcase + '_as_options'
# create the template code
code =
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Use proc
instead of Proc.new
. Open
Open
Proc.new do
- Read upRead up
- Exclude checks
This cops checks for uses of Proc.new where Kernel#proc would be more appropriate.
Example:
# bad
p = Proc.new { |n| puts n }
# good
p = proc { |n| puts n }