Class: FlashNow
- Inherits:
-
Object
- Object
- FlashNow
- Defined in:
- lib/scaffold/lib/controller/cookies/flash_now.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, val) ⇒ Object
-
#initialize(hash = {}) ⇒ FlashNow
constructor
A new instance of FlashNow.
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
#hash ⇒ Object (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 |