Class: Hanami::App Private
- Inherits:
-
Object
- Object
- Hanami::App
- Defined in:
- lib/hanami/app.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Main application that mounts many Rack and/or Hanami applications.
Instance Method Summary collapse
-
#call(env) ⇒ Array
private
Implements Rack SPEC.
-
#initialize(configuration, environment) ⇒ App
constructor
private
Initialize a new instance.
Constructor Details
#initialize(configuration, environment) ⇒ App
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new instance
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/hanami/app.rb', line 22 def initialize(configuration, environment) Components.resolve('apps') @builder = Rack::Builder.new @routes = Hanami::Router.new mount(configuration) middleware(configuration, environment) builder.run(routes) @app = builder.to_app end |
Instance Method Details
#call(env) ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Implements Rack SPEC
43 44 45 |
# File 'lib/hanami/app.rb', line 43 def call(env) app.call(env) end |