Sha256: 2d59641b1ac5170c7df23bc90b64d0361fc79685b5995edac1b311fcdb8085ad
Contents?: true
Size: 489 Bytes
Versions: 7
Compression:
Stored size: 489 Bytes
Contents
# frozen_string_literal: true require "rack" require "toycol" Toycol::Protocol.use(:rubylike) class App def call(env) case env["REQUEST_METHOD"] when "GET" [ 200, { "Content-Type" => "text/html" }, ["I love ruby!\n", "I love RubyKaigi!\n"] ] when "OTHER" [ 700, { "Content-Type" => "text/html" }, ["Sorry, but I'd like you to speak more like a Ruby programmer...\n"] ] end end end run App.new
Version data entries
7 entries across 7 versions & 1 rubygems