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.



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

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

Instance Attribute Details

#emacs_formatObject

Returns the value of attribute emacs_format.



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

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.



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

def violations
  @violations
end

Instance Method Details

#process(&count_violations_on_line) ⇒ Object



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

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