Class: Waw::Kern::LivingState::Saved
- Defined in:
- lib/waw/kern/living_state.rb,
lib/waw/kern/living_state.rb
Overview
The living state object itself
Instance Attribute Summary collapse
-
#rack_env ⇒ Object
readonly
Rack environment.
Instance Method Summary collapse
-
#initialize(rack_env) ⇒ Saved
constructor
Creates a saved instance.
-
#rack_request ⇒ Object
Current request.
-
#rack_response ⇒ Object
Current response.
-
#rack_session ⇒ Object
Rack session object.
-
#waw_session ⇒ Object
Waw session.
Constructor Details
#initialize(rack_env) ⇒ Saved
Creates a saved instance
13 14 15 |
# File 'lib/waw/kern/living_state.rb', line 13 def initialize(rack_env) @rack_env = rack_env end |
Instance Attribute Details
#rack_env ⇒ Object (readonly)
Rack environment
10 11 12 |
# File 'lib/waw/kern/living_state.rb', line 10 def rack_env @rack_env end |
Instance Method Details
#rack_request ⇒ Object
Current request
18 19 20 |
# File 'lib/waw/kern/living_state.rb', line 18 def rack_request @rack_request ||= Rack::Request.new(rack_env) end |
#rack_response ⇒ Object
Current response
23 24 25 |
# File 'lib/waw/kern/living_state.rb', line 23 def rack_response @rack_response ||= Rack::Response.new(rack_env) end |
#rack_session ⇒ Object
Rack session object
28 29 30 |
# File 'lib/waw/kern/living_state.rb', line 28 def rack_session @rack_session ||= (rack_env['rack.session'] ||= {}) end |