class Firehose::Client::Producer::Http::Builder

A DSL for publishing requests. This doesn’t so much, but lets us call Firehose::Client::Producer::Http#publish(‘message’).to(‘channel’). Slick eh? If you don’t like it, just all Firehose::Client::Producer::Http#put(‘message’, ‘channel’)

Public Class Methods

new(producer, message) click to toggle source
# File lib/firehose/client/producer.rb, line 19
def initialize(producer, message)
  @producer, @message = producer, message
  self
end

Public Instance Methods

to(channel, opts={}, &callback) click to toggle source
# File lib/firehose/client/producer.rb, line 24
def to(channel, opts={}, &callback)
  @producer.put(@message, channel, opts, &callback)
end