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



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/rake/extensions.rb', line 71

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