class OnsOnRails::Publishers::Tcp
Public Class Methods
new(options)
click to toggle source
# File lib/ons_on_rails/publishers/tcp.rb, line 4 def initialize(options) @client = Ons::Producer.new(options.fetch(:access_key), options.fetch(:secret_key), options.fetch(:producer_id)) @client.start end
Public Instance Methods
publish(topic, tag, body, key)
click to toggle source
# File lib/ons_on_rails/publishers/tcp.rb, line 9 def publish(topic, tag, body, key) @client.send_message(topic, tag, body, key) end