Class: Buster::Sender

Inherits:
Object
  • Object
show all
Defined in:
lib/buster/sender.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Sender

Returns a new instance of Sender.



3
4
5
# File 'lib/buster/sender.rb', line 3

def initialize(context)
  @context = context
end

Instance Method Details

#fire(name, props = {}) ⇒ Object



7
8
9
10
# File 'lib/buster/sender.rb', line 7

def fire(name, props = {})
  bin = MessagePack.pack(props)
  sender.send_strings([name.to_s, bin])
end