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.
      93 94 95  | 
    
      # File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 93 def initialize(flash) @flash = flash end  | 
  
Instance Attribute Details
#flash ⇒ Object
Returns the value of attribute flash.
      91 92 93  | 
    
      # File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 91 def flash @flash end  | 
  
Instance Method Details
#[](k) ⇒ Object
      104 105 106  | 
    
      # File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 104 def [](k) @flash[k.to_s] end  | 
  
#[]=(k, v) ⇒ Object
      97 98 99 100 101 102  | 
    
      # File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 97 def []=(k, v) k = k.to_s @flash[k] = v @flash.discard(k) v end  |