Class: SyncMachine::EnsurePublication

Inherits:
Object
  • Object
show all
Defined in:
lib/sync_machine/ensure_publication.rb,
lib/sync_machine/ensure_publication/deduper.rb,
lib/sync_machine/ensure_publication/publication_history.rb

Overview

Orchestrate logic around a change notification and whether to publish a new document to the service.

Defined Under Namespace

Classes: Deduper, PublicationHistory

Instance Method Summary collapse

Constructor Details

#initialize(enqueue_time_str:, hooks:, subject:, sync_module:) ⇒ EnsurePublication

Returns a new instance of EnsurePublication.



8
9
10
11
12
13
# File 'lib/sync_machine/ensure_publication.rb', line 8

def initialize(enqueue_time_str:, hooks:, subject:, sync_module:)
  @enqueue_time_str = enqueue_time_str
  @hooks = hooks
  @subject = subject
  @sync_module = sync_module
end

Instance Method Details

#runObject



15
16
17
# File 'lib/sync_machine/ensure_publication.rb', line 15

def run
  dedupe { run_deduped }
end