Class: Gitgo::Session
- Inherits:
-
Object
- Object
- Gitgo::Session
- Defined in:
- lib/gitgo/server.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#session_env ⇒ Object
readonly
Returns the value of attribute session_env.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, session_env) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(app, session_env) ⇒ Session
Returns a new instance of Session.
11 12 13 14 15 16 |
# File 'lib/gitgo/server.rb', line 11 def initialize(app, session_env) @app = app @session = {} @session_env = session_env @session_env['rack.session'] = @session end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
7 8 9 |
# File 'lib/gitgo/server.rb', line 7 def app @app end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
8 9 10 |
# File 'lib/gitgo/server.rb', line 8 def session @session end |
#session_env ⇒ Object (readonly)
Returns the value of attribute session_env.
9 10 11 |
# File 'lib/gitgo/server.rb', line 9 def session_env @session_env end |
Instance Method Details
#call(env) ⇒ Object
18 19 20 21 |
# File 'lib/gitgo/server.rb', line 18 def call(env) env.merge!(session_env) app.call(env) end |