Class: HoptoadZmqNotifier::Sender
- Inherits:
-
Object
- Object
- HoptoadZmqNotifier::Sender
- Defined in:
- lib/hoptoad_zmq_notifier/sender.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Sender
constructor
A new instance of Sender.
- #send_to_hoptoad(data) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Sender
Returns a new instance of Sender.
12 13 14 15 16 |
# File 'lib/hoptoad_zmq_notifier/sender.rb', line 12 def initialize( = {}) [:mailbox_size, :uri].each do |option| instance_variable_set("@#{option}", [option]) end end |
Instance Method Details
#send_to_hoptoad(data) ⇒ Object
7 8 9 10 |
# File 'lib/hoptoad_zmq_notifier/sender.rb', line 7 def send_to_hoptoad data logger.debug { "Sending request to #{@uri}:\n#{data}" } if logger socket.send_string data, ZMQ::NOBLOCK end |