Module: HoptoadZmqNotifier

Defined in:
lib/hoptoad_zmq_notifier.rb,
lib/hoptoad_zmq_notifier/sender.rb,
lib/hoptoad_zmq_notifier/version.rb,
lib/hoptoad_zmq_notifier/configuration.rb

Defined Under Namespace

Classes: Configuration, Sender

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

A Hoptoad Notifier ZMQ configuration object. Must act like a hash and return sensible values for all Hoptoad ZMQ configuration options. See HoptoadNotifierZmq::Configuration.



13
14
15
# File 'lib/hoptoad_zmq_notifier.rb', line 13

def configuration
  @configuration
end

.senderObject

The sender object is responsible for delivering formatted data to the Hoptoad server. Must respond to #send_to_hoptoad. See HoptoadNotifier::Sender.



9
10
11
# File 'lib/hoptoad_zmq_notifier.rb', line 9

def sender
  @sender
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Call this method to modify defaults in your initializers.

Examples:

HoptoadNotifierZmq.configure do |config|
  config.mailbox_sizr = 1000
  config.uri  = 'tcp://errbit.home:9999'
end

Yields:



22
23
24
25
26
# File 'lib/hoptoad_zmq_notifier.rb', line 22

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
  self.sender = Sender.new(configuration)
end