Class: Vxod::BackPath

Inherits:
Object
  • Object
show all
Defined in:
lib/vxod/back_path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_appObject (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

#getObject



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.
  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