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.



41
42
43
# File 'lib/action_controller/flash.rb', line 41

def initialize(flash)
  @flash = flash
end

Instance Method Details

#[](k) ⇒ Object



51
52
53
# File 'lib/action_controller/flash.rb', line 51

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

#[]=(k, v) ⇒ Object



45
46
47
48
49
# File 'lib/action_controller/flash.rb', line 45

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