Class: YardJunk::Janitor::ProntoReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-junk/janitor/pronto_reporter.rb

Overview

Reporter that populates an array with the generated messages by YardJunk (so they can be reused elsewhere).

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ProntoReporter

Returns a new instance of ProntoReporter.


5
6
7
# File 'lib/yard-junk/janitor/pronto_reporter.rb', line 5

def initialize(errors)
  @errors = errors
end

Instance Method Details

#finalizeObject


9
# File 'lib/yard-junk/janitor/pronto_reporter.rb', line 9

def finalize; end

#section(_, _, messages) ⇒ Object


11
12
13
14
15
# File 'lib/yard-junk/janitor/pronto_reporter.rb', line 11

def section(_, _, messages)
  messages.each do |message|
    errors << OpenStruct.new(message: message.message, file: message.file, line: message.line)
  end
end

#stats(**stat) ⇒ Object


17
# File 'lib/yard-junk/janitor/pronto_reporter.rb', line 17

def stats(**stat); end