Class: Lookout::Runners::Console
- Defined in:
- lib/lookout/runners/console.rb
Instance Method Summary collapse
- #expectations_eval(&block) ⇒ Object
-
#initialize(expectations = Lookout::Expectations.new) ⇒ Console
constructor
A new instance of Console.
- #install ⇒ Object
Constructor Details
#initialize(expectations = Lookout::Expectations.new) ⇒ Console
Returns a new instance of Console.
4 5 6 7 |
# File 'lib/lookout/runners/console.rb', line 4 def initialize(expectations = Lookout::Expectations.new) @expectations = expectations @run = true end |
Instance Method Details
#expectations_eval(&block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/lookout/runners/console.rb', line 16 def expectations_eval(&block) @expectations.instance_eval(&block) rescue @run = false raise end |
#install ⇒ Object
9 10 11 12 13 14 |
# File 'lib/lookout/runners/console.rb', line 9 def install at_exit do exit 1 unless @run and @expectations.evaluate.succeeded? end self end |