Class: Qswarm::Speakers::Http

Inherits:
Qswarm::Speaker show all
Defined in:
lib/qswarm/speakers/http.rb

Constant Summary collapse

@@connections =
{}

Instance Attribute Summary

Attributes inherited from Qswarm::Speaker

#agent, #heard, #metadata, #name

Instance Method Summary collapse

Methods inherited from Qswarm::Speaker

#arg, #bind, #get_broker, #log, #parse

Methods included from DSL

#dsl_accessor

Methods included from Loggable

#logger, logger

Constructor Details

#initialize(listener, name, args, &block) ⇒ Http

Returns a new instance of Http.



9
10
11
12
13
# File 'lib/qswarm/speakers/http.rb', line 9

def initialize(listener, name, args, &block)
  @uri = URI.parse(name)
  @uri.host = 'localhost' if @uri.host.nil?
  super
end

Instance Method Details

#inject(format = :text, msg) ⇒ Object



15
16
17
# File 'lib/qswarm/speakers/http.rb', line 15

def inject(format = :text, msg)
  publish format, msg
end

#runObject



19
20
# File 'lib/qswarm/speakers/http.rb', line 19

def run
end