Class: Bane::Behaviors::FixedResponse

Inherits:
BasicBehavior show all
Defined in:
lib/bane/behaviors.rb

Overview

Sends a static response.

Options:

- message: The response message to send. Default: "Hello, world!"

Direct Known Subclasses

FixedResponseForEachLine

Instance Method Summary collapse

Methods inherited from BasicBehavior

inherited, simple_name

Instance Method Details

#serve(io, options) ⇒ Object



50
51
52
53
54
# File 'lib/bane/behaviors.rb', line 50

def serve(io, options)
  options = {:message => "Hello, world!"}.merge(options)

  io.write options[:message]
end