module Restforce::Concerns::Streaming

def subscription(channels, options = {}, &block)

Returns a Faye::Subscription

block - A block to run when a new message is received.
channels - The name of the Streaming API (cometD) channel(s) to subscribe to.

Public: Subscribe to one or more Streaming API channels
def subscription(channels, options = {}, &block)
  one_or_more_channels = Array(channels)
  one_or_more_channels.each do |channel|
    replay_handlers[channel] = options[:replay]
  end
  faye.subscribe(one_or_more_channels, &block)
end