Class: Kenji::App
- Inherits:
-
Object
- Object
- Kenji::App
- Defined in:
- lib/kenji/app.rb
Overview
Kenji::App is a simple wrapper class that helps avoid the awkward wrapping in a lambda typically necessary for using Kenji as a Rack app. Instead, simply do the following:
run Kenji::App.new(directory: Dir.getwd)
Any options passed will also be forwarded to Kenji.
Kenji::App has one instance for the app, unlike Kenji::Kenji which has one instance per request.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(opts = {}) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(opts = {}) ⇒ App
Returns a new instance of App.
17 18 19 |
# File 'lib/kenji/app.rb', line 17 def initialize(opts = {}) @opts = opts end |