Class: MerbHasFlash::FlashNow

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_has_flash/flash_hash.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(flash) ⇒ FlashNow

Returns a new instance of FlashNow.



3
4
5
# File 'lib/merb_has_flash/flash_hash.rb', line 3

def initialize(flash)
  @flash = flash
end

Instance Method Details

#[](key) ⇒ Object



13
14
15
# File 'lib/merb_has_flash/flash_hash.rb', line 13

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

#[]=(key, val) ⇒ Object



7
8
9
10
11
# File 'lib/merb_has_flash/flash_hash.rb', line 7

def []=(key, val)
  @flash[key] = val
  @flash.discard key
  val
end