Class: ActionDispatch::Flash::FlashNow
- Defined in:
- actionpack/lib/action_dispatch/middleware/flash.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#flash ⇒ Object
Returns the value of attribute flash.
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.
48 49 50 |
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 48 def initialize(flash) @flash = flash end |
Instance Attribute Details
#flash ⇒ Object
Returns the value of attribute flash
46 47 48 |
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 46 def flash @flash end |
Instance Method Details
#[](k) ⇒ Object
58 59 60 |
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 58 def [](k) @flash[k] end |
#[]=(k, v) ⇒ Object
52 53 54 55 56 |
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 52 def []=(k, v) @flash[k] = v @flash.discard(k) v end |