123456789_123456789_123456789_123456789_123456789_

Class: ActionDispatch::Flash::FlashNow

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: actionpack/lib/action_dispatch/middleware/flash.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(flash) ⇒ FlashNow

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 93

def initialize(flash)
  @flash = flash
end

Instance Attribute Details

#alert=(message) (writeonly)

Convenience accessor for =.

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 109

def alert=(message)
  self[:alert] = message
end

#flash (rw)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 91

attr_accessor :flash

#notice=(message) (writeonly)

Convenience accessor for =.

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 114

def notice=(message)
  self[:notice] = message
end

Instance Method Details

#[](k)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 104

def [](k)
  @flash[k.to_s]
end

#[]=(k, v)

[ GitHub ]

  
# 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