Sha256: 069864db95659c948d64f36d9538b71f9d08389915a93ef72a8a73a2b3105a88

Contents?: true

Size: 255 Bytes

Versions: 3

Compression:

Stored size: 255 Bytes

Contents

module Pubsubstub
  class PublishAction < Pubsubstub::Action
    post '/' do
      (params[:channels] || [:default]).each do |channel_name|
        Pubsubstub.publish(channel_name, params[:data], name: params[:event])
      end
      ""
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pubsubstub-0.1.1 lib/pubsubstub/publish_action.rb
pubsubstub-0.1.0 lib/pubsubstub/publish_action.rb
pubsubstub-0.1.0.beta1 lib/pubsubstub/publish_action.rb