Sha256: d26aa12e6625142aa38521c183de1350d2b92c73edf8803bc1f8c32f2ec9e5cb
Contents?: true
Size: 683 Bytes
Versions: 26
Compression:
Stored size: 683 Bytes
Contents
module OodAppkit # Middleware that serves entries below the `root` given, according to the # path info of the Rack request. # @see http://www.rubydoc.info/github/rack/rack/master/Rack/Directory Descripton of `Rack::Directory` class FilesRackApp # The root path on file system that this app serves entries from below # @return [String] the root path attr_accessor :root # @param root [String, #to_s] the root path def initialize(root: OodAppkit.dataroot) @root = root.to_s end # Use `Rack::Directory` as middleware with `root` set as `dataroot` by # default def call(env) Rack::Directory.new(root).call(env) end end end
Version data entries
26 entries across 26 versions & 1 rubygems