class Bane::Behaviors::Responders::FixedResponse

Sends a static response.

Options:

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

Public Class Methods

new(options = {}) click to toggle source
# File lib/bane/behaviors/responders/fixed_response.rb, line 12
def initialize(options = {})
  @options = {message: "Hello, world!"}.merge(options)
end

Public Instance Methods

serve(io) click to toggle source
# File lib/bane/behaviors/responders/fixed_response.rb, line 16
def serve(io)
  io.write @options[:message]
end