Class: EmmyHttp::Application
- Inherits:
-
Rack::Builder
- Object
- Rack::Builder
- EmmyHttp::Application
- Defined in:
- lib/emmy_http/server/application.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#server ⇒ Object
Returns the value of attribute server.
Class Method Summary collapse
Instance Method Summary collapse
- #configure(&b) ⇒ Object
-
#initialize(app = nil, &block) ⇒ Application
constructor
A new instance of Application.
- #to_a ⇒ Object
Constructor Details
#initialize(app = nil, &block) ⇒ Application
Returns a new instance of Application.
8 9 10 11 |
# File 'lib/emmy_http/server/application.rb', line 8 def initialize(app = nil, &block) @config = Emmy::Runner.instance.config.copy super end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/emmy_http/server/application.rb', line 5 def config @config end |
#server ⇒ Object
Returns the value of attribute server.
6 7 8 |
# File 'lib/emmy_http/server/application.rb', line 6 def server @server end |
Class Method Details
.app(default_app = nil, &block) ⇒ Object
13 14 15 |
# File 'lib/emmy_http/server/application.rb', line 13 def self.app(default_app = nil, &block) self.new(default_app, &block).to_app end |
Instance Method Details
#configure(&b) ⇒ Object
17 18 19 |
# File 'lib/emmy_http/server/application.rb', line 17 def configure(&b) instance_eval(&b) end |
#to_a ⇒ Object
25 26 27 |
# File 'lib/emmy_http/server/application.rb', line 25 def to_a server.to_a end |