Sha256: 7ddfce2709c44b5f79de774fe3e160abc890ca19b884df603eda5d669a5e60d5
Contents?: true
Size: 398 Bytes
Versions: 1
Compression:
Stored size: 398 Bytes
Contents
class Stormy::Static def initialize(root) @root = root @rack_file = Rack::File.new(root) end def can_serve?(path) extension = Stormy::Template.extract_extension(path) if !Stormy::Template.rendered_extension?(extension) File.exists?(File.join(@root, path)) end end def serve(path) @rack_file.call("PATH_INFO" => path, "REQUEST_METHOD"=>"GET") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stormy-0.0.1 | lib/stormy/static.rb |