Class: SknUtils::SyncWorker
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(&blk) ⇒ SyncWorker
constructor
A new instance of SyncWorker.
Constructor Details
#initialize(&blk) ⇒ SyncWorker
Returns a new instance of SyncWorker.
12 13 14 |
# File 'lib/skn_utils/concurrent_jobs.rb', line 12 def initialize(&blk) @blk = blk end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 |
# File 'lib/skn_utils/concurrent_jobs.rb', line 16 def call @blk.call rescue => ex SknFailure.(ex.class.name, { cause: ex., backtrace: ex.backtrace[0..8]}) end |