Class: Cane::Runner
- Inherits:
-
Object
- Object
- Cane::Runner
- Defined in:
- lib/cane/runner.rb
Overview
Orchestrates the running of checks per the provided configuration, and hands the result to a formatter for display. This is the core of the application, but for the actual entry point see ‘Cane::CLI`.
Instance Method Summary collapse
-
#initialize(spec) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(spec) ⇒ Runner
Returns a new instance of Runner.
17 18 19 20 |
# File 'lib/cane/runner.rb', line 17 def initialize(spec) @opts = spec @checks = spec[:checks] end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 |
# File 'lib/cane/runner.rb', line 22 def run outputter.print formatter.new(violations, opts) violations.length <= opts.fetch(:max_violations) end |