class RuboCop::Cop::Legacy::Corrector
Legacy
Corrector
for v0 API support. See docs.rubocop.org/rubocop/v1_upgrade_notes.html
Public Class Methods
new(source, corr = [])
click to toggle source
Support legacy second argument
Calls superclass method
RuboCop::Cop::Corrector::new
# File lib/rubocop/cop/legacy/corrector.rb, line 10 def initialize(source, corr = []) super(source) if corr.is_a?(CorrectionsProxy) merge!(corr.send(:corrector)) else # warn "Corrector.new with corrections is deprecated." unless corr.empty? TODO corr.each { |c| corrections << c } end end
Public Instance Methods
corrections()
click to toggle source
# File lib/rubocop/cop/legacy/corrector.rb, line 20 def corrections # warn "#corrections is deprecated. Open an issue if you have a valid usecase." TODO CorrectionsProxy.new(self) end