Class: Quality::CommandOutputProcessor
- Inherits:
-
Object
- Object
- Quality::CommandOutputProcessor
- 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
-
#emacs_format ⇒ Object
Returns the value of attribute emacs_format.
-
#file ⇒ Object
Returns the value of attribute file.
-
#found_output ⇒ Object
readonly
Returns the value of attribute found_output.
-
#violations ⇒ Object
readonly
Returns the value of attribute violations.
Instance Method Summary collapse
-
#initialize ⇒ CommandOutputProcessor
constructor
A new instance of CommandOutputProcessor.
- #process(&count_violations_on_line) ⇒ Object
Constructor Details
#initialize ⇒ CommandOutputProcessor
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_format ⇒ Object
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 |
#file ⇒ Object
Returns the value of attribute file.
7 8 9 |
# File 'lib/quality/command_output_processor.rb', line 7 def file @file end |
#found_output ⇒ Object (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 |
#violations ⇒ Object (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 |