Sha256: 0f51c16d105d94e6edb2d046f25f1b3f2d1197d6ace12db5c39805e226dfffd6

Contents?: true

Size: 635 Bytes

Versions: 5

Compression:

Stored size: 635 Bytes

Contents

module <%= class_name %>
  class EnsurePublicationWorker < SyncMachine::EnsurePublicationWorker
    check_publishable do |<%= subject %>|
      # Return a boolean value indicating whether the <%= subject %>
      # should be published at all.
    end

    build do |<%= subject %>|
      # Generate and return a payload to send to the external service.
    end

    publish do |<%= subject %>, payload|
      # Send the payload to the external service.
    end

    after_publish do |<%= subject %>|
      # Execute any actions after a successful publish.  This step is optional
      # and can be deleted entirely.
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sync_machine-1.2.0 lib/rails/generators/templates/ensure_publication_worker.rb
sync_machine-1.1.1 lib/rails/generators/templates/ensure_publication_worker.rb
sync_machine-1.1.0 lib/rails/generators/templates/ensure_publication_worker.rb
sync_machine_generator-0.8.0 lib/generators/templates/ensure_publication_worker.rb
sync_machine_generator-0.1.0 lib/generators/templates/ensure_publication_worker.rb