Class: ActionController::Flash::FlashNow

Inherits:
Object
  • Object
show all
Defined in:
lib/action_controller/flash.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(flash) ⇒ FlashNow

Returns a new instance of FlashNow.



39
40
41
# File 'lib/action_controller/flash.rb', line 39

def initialize(flash)
  @flash = flash
end

Instance Method Details

#[](k) ⇒ Object



49
50
51
# File 'lib/action_controller/flash.rb', line 49

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

#[]=(k, v) ⇒ Object



43
44
45
46
47
# File 'lib/action_controller/flash.rb', line 43

def []=(k, v)
  @flash[k] = v
  @flash.discard(k)
  v
end