Class: ClosingComments::Processor
- Inherits:
-
Object
- Object
- ClosingComments::Processor
- Defined in:
- lib/closing_comments/processor.rb
Defined Under Namespace
Classes: Fixer, JSON, Reporter
Instance Method Summary collapse
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
-
#process(path:) ⇒ Object
TODO(marcinw): catch parsing errors;.
- #success? ⇒ Boolean
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
5 6 7 |
# File 'lib/closing_comments/processor.rb', line 5 def initialize @reportables = {} end |
Instance Method Details
#process(path:) ⇒ Object
TODO(marcinw): catch parsing errors;
10 11 12 13 14 |
# File 'lib/closing_comments/processor.rb', line 10 def process(path:) source = Source.from(path: path) handle(source) @reportables[path] = source if source.problematic? end |
#success? ⇒ Boolean
16 17 18 |
# File 'lib/closing_comments/processor.rb', line 16 def success? @reportables.empty? end |