Sha256: baadce1bc570e713ec522d8da5bfa86ed92a70af68331dbc2deb6886ffa9998d

Contents?: true

Size: 305 Bytes

Versions: 5

Compression:

Stored size: 305 Bytes

Contents

module PgNotifier
  class Subscription
    attr_reader :channel, :options, :block

    def initialize(channel, options, &block)
      @channel = channel
      @options = options
      @block = block
    end

    def notify(channel, pid, payload)
      block.call [channel, pid, payload]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pg_notifier-0.1.3 lib/pg_notifier/subscription.rb
pg_notifier-0.1.2 lib/pg_notifier/subscription.rb
pg_notifier-0.1.1 lib/pg_notifier/subscription.rb
pg_notifier-0.1.0 lib/pg_notifier/subscription.rb
pg_notifier-0.0.1 lib/pg_notifier/subscription.rb