class Staticpress::Server
Public Class Methods
new()
click to toggle source
# File lib/staticpress/server.rb, line 3 def initialize @site = Staticpress::Site.new end
Public Instance Methods
call(env)
click to toggle source
# File lib/staticpress/server.rb, line 7 def call(env) if content = @site.find_content_by_env(env) [ 200, { 'Content-Type' => content.content_type }, [ content.render ] ] else [ 404, {}, [] ] end end