Class: TDiary::Rack::Static
- Inherits:
-
Object
- Object
- TDiary::Rack::Static
- Defined in:
- lib/tdiary/rack/static.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, base_dir) ⇒ Static
constructor
A new instance of Static.
Constructor Details
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tdiary/rack/static.rb', line 15 def call( env ) result = [] @file.each do |f| result = f.call(env) break if result[0].to_i < 400 || result[0].to_i >= 500 end if result[0].to_i >= 400 && result[0].to_i < 500 @app.call( env ) else result end end |