Class: SyncMachine::EnsurePublicationWorker::Hook
- Inherits:
-
Object
- Object
- SyncMachine::EnsurePublicationWorker::Hook
- Defined in:
- lib/sync_machine/ensure_publication_worker.rb
Overview
Wrap build, check_publishable, etc blocks.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(name, block) ⇒ Hook
constructor
A new instance of Hook.
Constructor Details
#initialize(name, block) ⇒ Hook
Returns a new instance of Hook.
41 42 43 44 |
# File 'lib/sync_machine/ensure_publication_worker.rb', line 41 def initialize(name, block) @name = name @block = block end |
Instance Method Details
#call(*args) ⇒ Object
46 47 48 49 50 |
# File 'lib/sync_machine/ensure_publication_worker.rb', line 46 def call(*args) TracerAdapters.tracer_adapter.start_active_span(@name) do @block.call(*args) end end |