Class: Bobette::App
- Inherits:
-
Object
- Object
- Bobette::App
- Defined in:
- lib/bobette.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(builder) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(builder) ⇒ App
Returns a new instance of App.
7 8 9 |
# File 'lib/bobette.rb', line 7 def initialize(builder) @builder = builder end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 |
# File 'lib/bobette.rb', line 11 def call(env) @builder.call(env["bobette.payload"]).each { |b| b.build } [200, {"Content-Type" => "text/plain"}, ["OK"]] end |