Class: Greenletters::ExitTrigger

Inherits:
Trigger
  • Object
show all
Defined in:
lib/rake/extensions.rb

Overview

Monkey patch GreenLetters so that we can optionally ignore the exist status using the :any pattern.

Instance Method Summary collapse

Instance Method Details

#call(process) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/rake/extensions.rb', line 25

def call(process)
  if process.status then 
    if pattern == :any then
      @block.call(process, process.status)
      true
    elsif pattern === process.status.exitstatus
      @block.call(process, process.status)
      true
    else
      false
    end
  else
    false
  end
end