class Roda::RodaPlugins::Flash::FlashHash
used in the following request.
Simple flash hash, where assiging to the hash updates the flash
def []=(k, v)
Update the next hash with the given key and value.
def []=(k, v) @next[k] = v end
def discard(key=(no_arg=true))
no argument is given.
Remove given key from the next hash, or clear the next hash if
def discard(key=(no_arg=true)) if no_arg @next.clear else @next.delete(key) end end
def initialize(hash={})
as a new empty hash.
Setup the next hash when initializing, and handle treat nil
def initialize(hash={}) super(hash||{}) @next = {} end
def keep(key=(no_arg=true))
next hash if no argument is given.
next hash, or copy all entries from the current hash to the
Copy the entry with the given key from the current hash to the
def keep(key=(no_arg=true)) if no_arg @next.merge!(self) else self[key] = self[key] end end
def sweep
Replace the current hash with the next hash and clear the next hash.
def sweep replace(@next) @next.clear self end