Class: Warder::Runner
- Inherits:
-
Object
- Object
- Warder::Runner
- Defined in:
- lib/warder/runner.rb
Overview
abstract class for command runners
Direct Known Subclasses
BundleAuditRunner, CodeComplexityRunner, CodeDuplicationRunner, CodeSmellRunner, CoffeeLintRunner, MagickNumbersRunner, RailsAdviceRunner, RailsSecurityRunner, SandiRulesRunner, StyleGuideRunner
Constant Summary collapse
- SCORE =
30
- FAILURE_THRESHOLD =
0
Instance Method Summary collapse
-
#initialize(stdout, options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #perform ⇒ Object
Constructor Details
#initialize(stdout, options = {}) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 11 |
# File 'lib/warder/runner.rb', line 7 def initialize(stdout, = {}) @stdout = stdout @options = @issues = 0 end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/warder/runner.rb', line 13 def perform run_command do |line| @issues += number_of_issues(line) @stdout.puts(line) if printable?(line) end @issues > 0 ? 1 : 0 end |