FlashSessions are hashes that forget their contents after the first access. Useful for session-based messaging.
Public class methods
new
()
[show source]
# File lib/cloudkit/flash_session.rb, line 6 6: def initialize 7: @values = {} 8: end
Public instance methods
[]
(k)
Access a value, then forget it.
[show source]
# File lib/cloudkit/flash_session.rb, line 16 16: def [](k) 17: @values.delete(k) 18: end
[]=
(k, v)
Set the value for a key.
[show source]
# File lib/cloudkit/flash_session.rb, line 11 11: def []=(k, v) 12: @values[k] = v 13: end