Sha256: fe64944b2ddf7fce08e3ff79926559dc8f4b9b9c1c6ac4a14023fc68c1e28561
Contents?: true
Size: 698 Bytes
Versions: 1
Compression:
Stored size: 698 Bytes
Contents
module Rack module Blogengine class ApplicationRouter def self.map_route(env, target) status = 200 header = {"Content-Type" => "text/html; charset=UTF-8"} path = env["PATH_INFO"] documents = DocParser.parseInDocuments(target) # Iterate through available docs, if nothing matched return nil documents.each do |doc| if doc[:path] == path route_response = { "route" => path, "response" => [status, header, [doc[:html]] ] } return route_response end end return nil end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rack-blogengine-0.0.1 | lib/rack/blogengine/application_router.rb |