Class: Buster::Sender
- Inherits:
-
Object
- Object
- Buster::Sender
- Defined in:
- lib/buster/sender.rb
Instance Method Summary collapse
- #fire(name, props = {}) ⇒ Object
-
#initialize(context) ⇒ Sender
constructor
A new instance of Sender.
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 |