class Server::LoremPath

Public Instance Methods

do_GET(request, response) click to toggle source
# File lib/server.rb, line 22
def do_GET(request, response)
  length = request.query['length'].to_i
  length = -1 if length < 1
  response.body = Server::LoremIpsum.lorem[0..length]
  response.status = 200
end