Class: HamlLint::OffenceCollector

Inherits:
RuboCop::Formatter::BaseFormatter
  • Object
show all
Defined in:
lib/haml_lint/linter/rubocop.rb

Overview

Collects offences detected by RuboCop.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.offencesObject

Returns the value of attribute offences


65
66
67
# File 'lib/haml_lint/linter/rubocop.rb', line 65

def offences
  @offences
end

Instance Attribute Details

#offencesObject

Returns the value of attribute offences


62
63
64
# File 'lib/haml_lint/linter/rubocop.rb', line 62

def offences
  @offences
end

Instance Method Details

#file_finished(_file, offences) ⇒ Object


72
73
74
# File 'lib/haml_lint/linter/rubocop.rb', line 72

def file_finished(_file, offences)
  self.class.offences += offences
end

#started(_target_files) ⇒ Object


68
69
70
# File 'lib/haml_lint/linter/rubocop.rb', line 68

def started(_target_files)
  self.class.offences = []
end