class Bane::Behaviors::Responders::DelugeResponse
Sends a large response. Response consists of a repeated ‘x’ character.
Options
- length: The size in bytes of the response to send. Default: 1,000,000 bytes
Public Class Methods
new(options = {})
click to toggle source
# File lib/bane/behaviors/responders/deluge_response.rb, line 12 def initialize(options = {}) @options = {length: 1_000_000}.merge(options) end
Public Instance Methods
serve(io)
click to toggle source
# File lib/bane/behaviors/responders/deluge_response.rb, line 16 def serve(io) length = @options[:length] length.times { io.write('x') } end