Class: Lotus::Container
- Inherits:
-
Object
- Object
- Lotus::Container
- Defined in:
- lib/lotus/container.rb
Overview
Defined Under Namespace
Classes: Router
Instance Attribute Summary collapse
- #routes ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize ⇒ Container
constructor
A new instance of Container.
Constructor Details
#initialize ⇒ Container
Returns a new instance of Container.
29 30 31 32 33 34 |
# File 'lib/lotus/container.rb', line 29 def initialize Mutex.new.synchronize do assert_configuration_presence! prepare_middleware_stack! end end |
Instance Attribute Details
#routes ⇒ Object (readonly)
20 21 22 |
# File 'lib/lotus/container.rb', line 20 def routes @routes end |
Class Method Details
.configure(options = {}, &blk) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/lotus/container.rb', line 22 def self.configure( = {}, &blk) Mutex.new.synchronize do @@options = @@configuration = blk end end |
Instance Method Details
#call(env) ⇒ Object
36 37 38 |
# File 'lib/lotus/container.rb', line 36 def call(env) @builder.call(env) end |