Class: Zold::VerboseThread
- Inherits:
-
Object
- Object
- Zold::VerboseThread
- Defined in:
- lib/zold/verbose_thread.rb
Overview
Verbose thread
Instance Method Summary collapse
-
#initialize(log = Log::Quiet.new) ⇒ VerboseThread
constructor
A new instance of VerboseThread.
- #run ⇒ Object
Constructor Details
#initialize(log = Log::Quiet.new) ⇒ VerboseThread
Returns a new instance of VerboseThread.
30 31 32 |
# File 'lib/zold/verbose_thread.rb', line 30 def initialize(log = Log::Quiet.new) @log = log end |
Instance Method Details
#run ⇒ Object
34 35 36 37 38 39 |
# File 'lib/zold/verbose_thread.rb', line 34 def run yield rescue StandardError => e @log.error("#{e.class.name}: #{e.} #{e.backtrace.join("\n\t")}") raise e end |