Class: Thread

Inherits:
Object
  • Object
show all
Defined in:
lib/nightwatch/monitor.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, &orig_block) ⇒ Thread

Returns a new instance of Thread.



79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/nightwatch/monitor.rb', line 79

def initialize(*args, &orig_block)
  block = proc do
    begin
      orig_block.call
    ensure
      if $!
        ExceptionManager.instance.add_exception($!)
      end
    end
  end

  orig_initialize(*args, &block)
end

Instance Method Details

#orig_initializeObject



77
# File 'lib/nightwatch/monitor.rb', line 77

alias_method :orig_initialize, :initialize