Class: RuboCop::Cop::Migration::BatchWithThrottling
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Migration::BatchWithThrottling
- Extended by:
- AutoCorrector
- Includes:
- Migration::CopConcerns::BatchProcessing
- Defined in:
- lib/rubocop/cop/migration/batch_with_throttling.rb
Overview
Use throttling in batch processing.
Constant Summary collapse
- MSG =
'Use throttling in batch processing.'- RESTRICT_ON_SEND =
%i[ delete_all update_all ].freeze
Constants included from Migration::CopConcerns::BatchProcessing
Migration::CopConcerns::BatchProcessing::BATCH_PROCESSING_METHOD_NAMES
Instance Method Summary collapse
- #on_send(node) ⇒ void (also: #on_csend)
Methods included from Migration::CopConcerns::BatchProcessing
Instance Method Details
#on_send(node) ⇒ void Also known as: on_csend
This method returns an undefined value.
49 50 51 52 53 54 55 |
# File 'lib/rubocop/cop/migration/batch_with_throttling.rb', line 49 def on_send(node) return unless wrong?(node) add_offense(node) do |corrector| autocorrect(corrector, node) end end |