db/migrate/20190627103617_backfill_limit_exceeded_defaults.rb
BackfillLimitExceededDefaults#up contains iterators nested 2 deep Open
Open
batch.each { |proxy| proxy.update_columns(error_status_limits_exceeded: 429, error_limits_exceeded: "Usage limit exceeded") }
- Read upRead up
- Exclude checks
A Nested Iterator
occurs when a block contains another block.
Example
Given
class Duck
class << self
def duck_names
%i!tick trick track!.each do |surname|
%i!duck!.each do |last_name|
puts "full name is #{surname} #{last_name}"
end
end
end
end
end
Reek would report the following warning:
test.rb -- 1 warning:
[5]:Duck#duck_names contains iterators nested 2 deep (NestedIterators)
BackfillLimitExceededDefaults#down contains iterators nested 2 deep Open
Open
batch.each { |proxy| proxy.update_columns(error_status_limits_exceeded: nil, error_limits_exceeded: nil) }
- Read upRead up
- Exclude checks
A Nested Iterator
occurs when a block contains another block.
Example
Given
class Duck
class << self
def duck_names
%i!tick trick track!.each do |surname|
%i!duck!.each do |last_name|
puts "full name is #{surname} #{last_name}"
end
end
end
end
end
Reek would report the following warning:
test.rb -- 1 warning:
[5]:Duck#duck_names contains iterators nested 2 deep (NestedIterators)