module HubspotEvent

Constants

VERSION

Attributes

adapter[RW]
backend[RW]
client_secret[RW]
event_filter[RW]
namespace[RW]

Public Class Methods

all(callable = Proc.new) click to toggle source
# File lib/hubspot_event.rb, line 28
def all(callable = Proc.new)
  subscribe nil, callable
end
configure() { |self| ... } click to toggle source
# File lib/hubspot_event.rb, line 14
def configure(&block)
  raise ArgumentError, "must provide a block" unless block_given?
  yield self
end
instrument(event) click to toggle source
# File lib/hubspot_event.rb, line 19
def instrument(event)
  event = event_filter.call(event)
  backend.instrument(namespace.call(event["subscriptionType"]), event) if event
end
subscribe(name, callable = Proc.new) click to toggle source
# File lib/hubspot_event.rb, line 24
def subscribe(name, callable = Proc.new)
  backend.subscribe(namespace.to_regexp(name), adapter.call(callable))
end