Class: Yard::Lint::Runner
- Inherits:
-
Object
- Object
- Yard::Lint::Runner
- Defined in:
- lib/yard/lint/runner.rb
Overview
Main runner class that orchestrates the YARD validation process
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#progress_formatter ⇒ Object
Returns the value of attribute progress_formatter.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
Instance Method Summary collapse
-
#initialize(selection, config = Config.new) ⇒ Runner
constructor
A new instance of Runner.
-
#run ⇒ Yard::Lint::Result
Runs all validators and returns a Result object.
Constructor Details
#initialize(selection, config = Config.new) ⇒ Runner
Returns a new instance of Runner.
18 19 20 21 22 23 |
# File 'lib/yard/lint/runner.rb', line 18 def initialize(selection, config = Config.new) @selection = Array(selection).flatten @config = config @result_builder = ResultBuilder.new(config) @progress_formatter = nil end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/yard/lint/runner.rb', line 13 def config @config end |
#progress_formatter ⇒ Object
Returns the value of attribute progress_formatter.
14 15 16 |
# File 'lib/yard/lint/runner.rb', line 14 def progress_formatter @progress_formatter end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection.
13 14 15 |
# File 'lib/yard/lint/runner.rb', line 13 def selection @selection end |
Instance Method Details
#run ⇒ Yard::Lint::Result
Runs all validators and returns a Result object
27 28 29 30 31 |
# File 'lib/yard/lint/runner.rb', line 27 def run raw_results = run_validators parsed_results = parse_results(raw_results) build_result(parsed_results, @selection) end |