Class: Laser::MisalignedUnindentationWarning

Inherits:
LineWarning show all
Defined in:
lib/laser/warnings/misaligned_unindentation.rb

Overview

This warning is used when

Instance Attribute Summary

Attributes inherited from Warning

#body, #file, #line_number, #name, #severity

Instance Method Summary (collapse)

Methods inherited from LineWarning

options

Constructor Details

- (MisalignedUnindentationWarning) initialize(file, line, expectation)



9
10
11
12
# File 'lib/laser/warnings/misaligned_unindentation.rb', line 9

def initialize(file, line, expectation)
  super(file, line)
  @expectation = expectation
end

Instance Method Details

- (Object) fix



14
15
16
# File 'lib/laser/warnings/misaligned_unindentation.rb', line 14

def fix
  indent self.line, @expectation
end