Class: Waves::Rackup
- Includes:
- Runtime
- Defined in:
- lib/waves/runtime/rackup.rb
Overview
Runtime to use with Rackup specifically.
The actual Rack application is built using ‘config.application` (see runtime/configuration.rb), not in the .ru file. Rackup expects to be used in the context of an already-running server. See the documentation for your webserver and Rack for details.
Your config.ru file should minimally look something like this:
require "waves"
require "waves/runtime/rackup"
run Waves::Rackup.load
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.load(options = {}) ⇒ Object
Load the runtime and return an application.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Rackup
constructor
A new instance of Rackup.
Methods included from Runtime
#config, #debug?, #load, #logger, #mode, #reload, #synchronize, #synchronize?
Constructor Details
#initialize(options = {}) ⇒ Rackup
Returns a new instance of Rackup.
29 30 31 32 |
# File 'lib/waves/runtime/rackup.rb', line 29 def initialize( = {} ) @options = load # load runtime end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
19 20 21 |
# File 'lib/waves/runtime/rackup.rb', line 19 def @options end |
Class Method Details
.load(options = {}) ⇒ Object
Load the runtime and return an application.
24 25 26 27 |
# File 'lib/waves/runtime/rackup.rb', line 24 def self.load( = {}) new( ) config.application.to_app end |