class Kemal::Session::Flash

Defined in:

kemal-session/flash.cr

Constant Summary

FLASH_PREFIX = "_flash_"

Constructors

Instance Method Summary

Constructor Detail

def self.new(session : Session) #

[View source]

Instance Method Detail

def [](key : String) : String #

env.flash["notice"] - raises if not found


[View source]
def []=(key : String, value : String) #

env.flash["notice"] = "welcome"


[View source]
def []?(key : String) : String | Nil #

env.flash["notice"]? - returns value and marks for deletion


[View source]