Class: Vxod::BackPath
- Inherits:
-
Object
- Object
- Vxod::BackPath
- Defined in:
- lib/vxod/back_path.rb
Instance Attribute Summary collapse
-
#rack_app ⇒ Object
readonly
Returns the value of attribute rack_app.
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(rack_app) ⇒ BackPath
constructor
A new instance of BackPath.
- #save(url) ⇒ Object
Constructor Details
#initialize(rack_app) ⇒ BackPath
Returns a new instance of BackPath.
3 4 5 |
# File 'lib/vxod/back_path.rb', line 3 def initialize(rack_app) @rack_app = rack_app end |
Instance Attribute Details
#rack_app ⇒ Object (readonly)
Returns the value of attribute rack_app.
7 8 9 |
# File 'lib/vxod/back_path.rb', line 7 def rack_app @rack_app end |
Instance Method Details
#get ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/vxod/back_path.rb', line 13 def get if app.session['vxod.back_path'] app.session['vxod.back_path'] else Vxod.config.after_login_default_path end end |
#save(url) ⇒ Object
9 10 11 |
# File 'lib/vxod/back_path.rb', line 9 def save(url) app.session['vxod.back_path'] = url end |