Class: FlashNow

Inherits:
Object
  • Object
show all
Defined in:
lib/scaffold/lib/controller/cookies/flash_now.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ FlashNow

Returns a new instance of FlashNow.



4
5
6
# File 'lib/scaffold/lib/controller/cookies/flash_now.rb', line 4

def initialize(hash = {})
  @hash = hash
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



2
3
4
# File 'lib/scaffold/lib/controller/cookies/flash_now.rb', line 2

def hash
  @hash
end

Instance Method Details

#[](key) ⇒ Object



8
9
10
# File 'lib/scaffold/lib/controller/cookies/flash_now.rb', line 8

def [](key)
  hash[key.to_s]
end

#[]=(key, val) ⇒ Object



12
13
14
# File 'lib/scaffold/lib/controller/cookies/flash_now.rb', line 12

def []=(key, val)
  hash[key.to_s] = val
end