Class: WhatToRun::Runner
- Inherits:
-
Object
- Object
- WhatToRun::Runner
- Defined in:
- lib/what_to_run/runner.rb
Overview
Abstract base spec runner
Direct Known Subclasses
Instance Attribute Summary collapse
-
#collect ⇒ Object
readonly
Returns the value of attribute collect.
-
#executable ⇒ Object
readonly
Returns the value of attribute executable.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Runner
Returns a new instance of Runner.
9 10 11 |
# File 'lib/what_to_run/runner.rb', line 9 def initialize(opts = {}) @executable = opts.fetch(:exec) end |
Instance Attribute Details
#collect ⇒ Object (readonly)
Returns the value of attribute collect.
7 8 9 |
# File 'lib/what_to_run/runner.rb', line 7 def collect @collect end |
#executable ⇒ Object (readonly)
Returns the value of attribute executable.
7 8 9 |
# File 'lib/what_to_run/runner.rb', line 7 def executable @executable end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/what_to_run/runner.rb', line 13 def run if predicted_examples.empty? exit 0 else Kernel.exec command end end |