Class: Qswarm::Speakers::Http
- Inherits:
-
Qswarm::Speaker
- Object
- Qswarm::Speaker
- Qswarm::Speakers::Http
- 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
-
#initialize(listener, name, args, &block) ⇒ Http
constructor
A new instance of Http.
- #inject(format = :text, msg) ⇒ Object
- #run ⇒ Object
Methods inherited from Qswarm::Speaker
#arg, #bind, #get_broker, #log, #parse
Methods included from DSL
Methods included from Loggable
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 |
#run ⇒ Object
19 20 |
# File 'lib/qswarm/speakers/http.rb', line 19 def run end |