Sha256: 9757e5724c3313e5142d8e675a0c513f5793b2c6c7c80a1d57b66f93f055a911

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 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.
      #
      # This step is optional.  If the step is deleted, the <%= subject %>
      # is considered always publishable.
    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

2 entries across 2 versions & 1 rubygems

Version Path
sync_machine-1.4.0 lib/rails/generators/templates/ensure_publication_worker.rb
sync_machine-1.3.0 lib/rails/generators/templates/ensure_publication_worker.rb