Class: ActionDispatch::Flash::FlashNow
- Inherits:
-
Object
- Object
- ActionDispatch::Flash::FlashNow
- Defined in:
- lib/action_dispatch/middleware/flash.rb
Overview
:nodoc:
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
-
#alert=(message) ⇒ Object
Convenience accessor for flash.now=.
-
#initialize(flash) ⇒ FlashNow
constructor
A new instance of FlashNow.
-
#notice=(message) ⇒ Object
Convenience accessor for flash.now=.
Constructor Details
#initialize(flash) ⇒ FlashNow
Returns a new instance of FlashNow.
44 45 46 |
# File 'lib/action_dispatch/middleware/flash.rb', line 44 def initialize(flash) @flash = flash end |
Instance Method Details
#[](k) ⇒ Object
54 55 56 |
# File 'lib/action_dispatch/middleware/flash.rb', line 54 def [](k) @flash[k] end |
#[]=(k, v) ⇒ Object
48 49 50 51 52 |
# File 'lib/action_dispatch/middleware/flash.rb', line 48 def []=(k, v) @flash[k] = v @flash.discard(k) v end |
#alert=(message) ⇒ Object
Convenience accessor for flash.now=
59 60 61 |
# File 'lib/action_dispatch/middleware/flash.rb', line 59 def alert=() self[:alert] = end |
#notice=(message) ⇒ Object
Convenience accessor for flash.now=
64 65 66 |
# File 'lib/action_dispatch/middleware/flash.rb', line 64 def notice=() self[:notice] = end |