Toycol::Protocol.define(:rubylike) do custom_status_codes( 700 => "Hmm...", ) additional_request_methods "OTHER" request.path do |message| /['"](?.+)['"]/.match(message)[:path] end request.http_method do |message| case /\.(?[A-z]+)/.match(message)&.captures&.first when "get" then "GET" else "OTHER" end end end