Class: Bane::Behaviors::Servers::ResponderServer
- Inherits:
-
GServer
- Object
- GServer
- Bane::Behaviors::Servers::ResponderServer
- Defined in:
- lib/bane/behaviors/servers/responder_server.rb
Instance Method Summary collapse
-
#initialize(port, behavior, host = Servers::LOCALHOST) ⇒ ResponderServer
constructor
A new instance of ResponderServer.
- #serve(io) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(port, behavior, host = Servers::LOCALHOST) ⇒ ResponderServer
Returns a new instance of ResponderServer.
11 12 13 14 15 |
# File 'lib/bane/behaviors/servers/responder_server.rb', line 11 def initialize(port, behavior, host = Servers::LOCALHOST) super(port, host) @behavior = behavior self.audit = true end |
Instance Method Details
#serve(io) ⇒ Object
17 18 19 |
# File 'lib/bane/behaviors/servers/responder_server.rb', line 17 def serve(io) @behavior.serve(io) end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/bane/behaviors/servers/responder_server.rb', line 21 def to_s "<Bane::BehaviorServer: port=#{@port}, behavior=#{@behavior.class}>" end |