Class | Nukumi2::Bricklet |
In: |
lib/nukumi2/bricklet.rb
|
Parent: | WEBrick::HTTPServlet::AbstractServlet |
# File lib/nukumi2/bricklet.rb, line 11 11: def do_GET(req, res) 12: begin 13: time = Time.now 14: page = @blog.fetch(req.path) 15: res.body = page.render 16: res['Content-Type'] = page.content_type 17: # res.body << "Took #{Time.now-time}s" 18: rescue Nukumi2::Blog::NotFound 19: raise WEBrick::HTTPStatus::NotFound, $!.message || "Page not found." 20: end 21: end