class Bane::Behaviors::Responders::RandomResponse
Sends a random response.
Public Instance Methods
serve(io)
click to toggle source
# File lib/bane/behaviors/responders/random_response.rb, line 9 def serve(io) io.write random_string end
Private Instance Methods
random_string()
click to toggle source
# File lib/bane/behaviors/responders/random_response.rb, line 14 def random_string (1..rand(26)+1).map { |i| ('a'..'z').to_a[rand(26)] }.join end