Class: Ramaze::MiddlewareCompiler
- Inherits:
-
Innate::MiddlewareCompiler
- Object
- Innate::MiddlewareCompiler
- Ramaze::MiddlewareCompiler
- Defined in:
- lib/ramaze/middleware_compiler.rb
Overview
Instance Method Summary (collapse)
-
- (Object) directory(path)
Adds the path as a directory.
-
- (Object) static(path)
Adds the path as a static file.
Instance Method Details
- (Object) directory(path)
Adds the path as a directory.
29 30 31 32 33 34 |
# File 'lib/ramaze/middleware_compiler.rb', line 29 def directory(path) require 'rack/contrib' Rack::ETag.new( Rack::ConditionalGet.new(Rack::Directory.new(path)), 'public' ) end |
- (Object) static(path)
Adds the path as a static file.
15 16 17 18 19 20 |
# File 'lib/ramaze/middleware_compiler.rb', line 15 def static(path) require 'rack/contrib' Rack::ETag.new( Rack::ConditionalGet.new(Rack::File.new(path)), 'public' ) end |