Class: Quality::CommandOutputProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/quality/command_output_processor.rb

Overview

Class processes output from a code quality command, tweaking it for editor output and counting the number of violations found

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommandOutputProcessor

Returns a new instance of CommandOutputProcessor.



11
12
13
14
15
# File 'lib/quality/command_output_processor.rb', line 11

def initialize
  @emacs_format = false
  @found_output = false
  @violations = 0
end

Instance Attribute Details

#emacs_formatObject

Returns the value of attribute emacs_format.



6
7
8
# File 'lib/quality/command_output_processor.rb', line 6

def emacs_format
  @emacs_format
end

#fileObject

Returns the value of attribute file.



7
8
9
# File 'lib/quality/command_output_processor.rb', line 7

def file
  @file
end

#found_outputObject (readonly)

Returns the value of attribute found_output.



8
9
10
# File 'lib/quality/command_output_processor.rb', line 8

def found_output
  @found_output
end

#violationsObject (readonly)

Returns the value of attribute violations.



9
10
11
# File 'lib/quality/command_output_processor.rb', line 9

def violations
  @violations
end

Instance Method Details

#process(&count_violations_on_line) ⇒ Object



17
18
19
# File 'lib/quality/command_output_processor.rb', line 17

def process(&count_violations_on_line)
  process_file(file, &count_violations_on_line)
end