Class: RackStaticApp::Static
- Inherits:
-
Vienna::Static
- Object
- Vienna::Static
- RackStaticApp::Static
- Defined in:
- lib/rackstaticapp.rb
Overview
RackStaticApp::Static is just a wrapper for Rack::Static with sane and opinionated options.
It serves all files under the given root and doesn’t passes on requests for files that don’t exist.
Examples
use RackStaticApp::Static, 'public'
Instance Method Summary collapse
- #header_rules ⇒ Object
- #index ⇒ Object
-
#initialize(app, root) ⇒ Static
constructor
A new instance of Static.
- #options ⇒ Object
- #root ⇒ Object
- #urls ⇒ Object
Constructor Details
Instance Method Details
#header_rules ⇒ Object
52 53 54 |
# File 'lib/rackstaticapp.rb', line 52 def header_rules super end |
#index ⇒ Object
48 49 50 |
# File 'lib/rackstaticapp.rb', line 48 def index super end |
#options ⇒ Object
56 57 58 |
# File 'lib/rackstaticapp.rb', line 56 def {urls: urls, root: root, index: index, header_rules: header_rules, cascade: true} end |
#root ⇒ Object
44 45 46 |
# File 'lib/rackstaticapp.rb', line 44 def root super end |
#urls ⇒ Object
40 41 42 |
# File 'lib/rackstaticapp.rb', line 40 def urls [""] end |