module Roda::RodaPlugins::Flash::InstanceMethods
Constants
- KEY
The internal session key used to store the flash.
Public Instance Methods
flash()
click to toggle source
Access the flash hash for the current request, loading it from the session if it is not already loaded.
# File lib/roda/plugins/flash.rb, line 86 def flash @_flash ||= FlashHash.new(session[KEY]) end
Private Instance Methods
_route()
click to toggle source
If the routing doesn’t raise an error, rotate the flash hash in the session so the next request has access to it.
Calls superclass method
# File lib/roda/plugins/flash.rb, line 94 def _route res = super if f = @_flash session[KEY] = f.next end res end