class

Kemal::Session::Flash

Inherits Reference < Object

A minimal, kemal-session-compatible flash: string values that survive exactly one subsequent read. Backed by prefixed keys in the session hash.

NOTE: this is not Rails' flash structure (Rails stores a nested {"flash":{...}} FlashHash). Interop with Rails flash is intentionally out of scope; see the README's "complex objects" suggestions.

Constants

PREFIX = "_flash_"

Constructors

new(session : Session)
Source

Instance methods

[](key : String) : String

Reads and consumes a flash string, raising KeyError if absent.

Source
[]=(key : String, value : String) : String

Stores a flash string.

Source
[]?(key : String) : String | Nil

Reads and consumes a flash string, or nil if absent.

Source