Class: Moon::Application::Rack
- Inherits:
-
Object
- Object
- Moon::Application::Rack
- Defined in:
- lib/moon/application/rack.rb
Overview
Adapter for Rack-up servers. Sinatra is used as helper.
Defined Under Namespace
Classes: Route
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#routes ⇒ Object
Returns the value of attribute routes.
-
#transponder ⇒ Object
readonly
Returns the value of attribute transponder.
Instance Method Summary collapse
- #call(*arguments) ⇒ Object
-
#initialize(application) ⇒ Rack
constructor
A new instance of Rack.
- #session=(session) ⇒ Object
Constructor Details
#initialize(application) ⇒ Rack
Returns a new instance of Rack.
10 11 12 13 |
# File 'lib/moon/application/rack.rb', line 10 def initialize(application) @application = application initialize_transponder end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
8 9 10 |
# File 'lib/moon/application/rack.rb', line 8 def environment @environment end |
#routes ⇒ Object
Returns the value of attribute routes.
6 7 8 |
# File 'lib/moon/application/rack.rb', line 6 def routes @routes end |
#transponder ⇒ Object (readonly)
Returns the value of attribute transponder.
7 8 9 |
# File 'lib/moon/application/rack.rb', line 7 def transponder @transponder end |
Instance Method Details
#call(*arguments) ⇒ Object
25 26 27 |
# File 'lib/moon/application/rack.rb', line 25 def call(*arguments) @transponder.call *arguments end |
#session=(session) ⇒ Object
15 16 17 18 |
# File 'lib/moon/application/rack.rb', line 15 def session=(session) @session = session set_session_secret end |