Class: Carnivore::Http::App
- Inherits:
-
Object
- Object
- Carnivore::Http::App
- Defined in:
- lib/carnivore-http/app.rb
Overview
Rack app for processing messages
Defined Under Namespace
Instance Attribute Summary collapse
-
#action ⇒ Proc
readonly
Action to process request.
Class Method Summary collapse
-
.build_app(args = {}, &block) ⇒ App
Build a new app.
Instance Method Summary collapse
-
#call(env) ⇒ Array
Process the request.
-
#initialize(args = {}) { ... } ⇒ self
constructor
Create a new instance.
Constructor Details
#initialize(args = {}) { ... } ⇒ self
Create a new instance
194 195 196 |
# File 'lib/carnivore-http/app.rb', line 194 def initialize(args={}, &block) @action = block end |
Instance Attribute Details
#action ⇒ Proc (readonly)
Returns action to process request.
187 188 189 |
# File 'lib/carnivore-http/app.rb', line 187 def action @action end |
Class Method Details
.build_app(args = {}, &block) ⇒ App
Build a new app
215 216 217 218 219 220 |
# File 'lib/carnivore-http/app.rb', line 215 def build_app(args={}, &block) Rack::Builder.new do use Rack::Chunked run self.new(args, &block) end end |