Class: Rack::If
- Inherits:
-
Object
- Object
- Rack::If
- Defined in:
- lib/rackif.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #call(rack_environment) ⇒ Object
-
#initialize(app, options = {}, &block) ⇒ If
constructor
A new instance of If.
Constructor Details
#initialize(app, options = {}, &block) ⇒ If
Returns a new instance of If.
7 8 9 10 11 12 |
# File 'lib/rackif.rb', line 7 def initialize(app, ={}, &block) @options = @app = app @block = block end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
5 6 7 |
# File 'lib/rackif.rb', line 5 def app @app end |
Instance Method Details
#call(rack_environment) ⇒ Object
14 15 16 |
# File 'lib/rackif.rb', line 14 def call(rack_environment) Rack::IfProcessing.new(app,@options, &@block).call(rack_environment) end |