Class: Slimembedcop::TemplateCorrector
- Inherits:
-
Object
- Object
- Slimembedcop::TemplateCorrector
- Defined in:
- lib/slimembedcop/template_corrector.rb
Overview
Apply auto-corrections to Template file.
Instance Method Summary collapse
-
#initialize(path, offenses, source) ⇒ TemplateCorrector
constructor
A new instance of TemplateCorrector.
- #run ⇒ Object
Constructor Details
#initialize(path, offenses, source) ⇒ TemplateCorrector
Returns a new instance of TemplateCorrector.
9 10 11 12 13 |
# File 'lib/slimembedcop/template_corrector.rb', line 9 def initialize(path, offenses, source) @path = path @offenses = offenses @source = source end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/slimembedcop/template_corrector.rb', line 15 def run ::RuboCop::Cop::Legacy::Corrector.new(source_buffer, corrections).rewrite end |