Flash

提供对 flash 消息的创建、读/写、删除等相关操作。

有 FlashHash 和 FlashNow 两个类。

flash 是 FlashHash 的实例对象; flash.now 是 FlashNow 的实例对象。

[]
[]=

now

alert
alert=

notice
notice=

empty?

clear

delete

discard

key?
keys

to_hash

each

initialize_copy

keep

使用上就能感觉得出 flash 消息兼有 Hash 和 Enumerable 实例对象的部分特性。

至于如何使用,可以查看【Flash 相关使用】章节。

最后更新于