Class: RWDSession
Instance Attribute Summary collapse
-
#authenticated ⇒ Object
Returns the value of attribute authenticated.
-
#lastaccess ⇒ Object
readonly
Returns the value of attribute lastaccess.
-
#sessionid ⇒ Object
readonly
Returns the value of attribute sessionid.
Instance Method Summary collapse
-
#initialize(sessionid = nil) ⇒ RWDSession
constructor
A new instance of RWDSession.
- #render(res, path, post, download, downloadfile, pda = false) ⇒ Object
- #touch ⇒ Object
Methods inherited from Hash
file, #ids, #rwd_table, #save, #subset, #to_i
Constructor Details
#initialize(sessionid = nil) ⇒ RWDSession
Returns a new instance of RWDSession.
1179 1180 1181 1182 1183 |
# File 'lib/rwd/rwd.rb', line 1179 def initialize(sessionid=nil) @sessionid = sessionid @lastaccess = Time.now @authenticated = false end |
Instance Attribute Details
#authenticated ⇒ Object
Returns the value of attribute authenticated.
1176 1177 1178 |
# File 'lib/rwd/rwd.rb', line 1176 def authenticated @authenticated end |
#lastaccess ⇒ Object (readonly)
Returns the value of attribute lastaccess.
1175 1176 1177 |
# File 'lib/rwd/rwd.rb', line 1175 def lastaccess @lastaccess end |
#sessionid ⇒ Object (readonly)
Returns the value of attribute sessionid.
1174 1175 1176 |
# File 'lib/rwd/rwd.rb', line 1174 def sessionid @sessionid end |
Instance Method Details
#render(res, path, post, download, downloadfile, pda = false) ⇒ Object
1189 1190 1191 1192 1193 1194 1195 |
# File 'lib/rwd/rwd.rb', line 1189 def render(res, path, post, download, downloadfile, pda=false) done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid) res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}") return done end |
#touch ⇒ Object
1185 1186 1187 |
# File 'lib/rwd/rwd.rb', line 1185 def touch @lastaccess = Time.now end |