Class: Pronto::YardRunner

Inherits:
Runner
  • Object
show all
Defined in:
lib/pronto/yard_runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ YardRunner

Returns a new instance of YardRunner.


7
8
9
# File 'lib/pronto/yard_runner.rb', line 7

def initialize(*args)
  super
end

Instance Method Details

#runObject

Entry point to our Pronto runner


12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pronto/yard_runner.rb', line 12

def run
  errors = run_yard

  ruby_patches.map do |patch|
    # TODO: Move this to a regex or something, but don't use a private method
    path = patch.send(:new_file_path)
    errors_for_patch = errors.select { |error| error.file == path }

    inspect(patch, errors_for_patch)
  end.flatten.compact
end