Class: ASeriesOfTubes::TubeState::Flash
- Inherits:
-
Object
- Object
- ASeriesOfTubes::TubeState::Flash
- Defined in:
- lib/a_series_of_tubes/tube_state/flash.rb
Instance Attribute Summary collapse
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#now ⇒ Object
readonly
Returns the value of attribute now.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(existing_flash_data = {}) ⇒ Flash
constructor
A new instance of Flash.
Constructor Details
#initialize(existing_flash_data = {}) ⇒ Flash
Returns a new instance of Flash.
8 9 10 11 |
# File 'lib/a_series_of_tubes/tube_state/flash.rb', line 8 def initialize existing_flash_data = {} @store = existing_flash_data @next = {} end |
Instance Attribute Details
#next ⇒ Object (readonly)
Returns the value of attribute next.
6 7 8 |
# File 'lib/a_series_of_tubes/tube_state/flash.rb', line 6 def next @next end |
#now ⇒ Object (readonly)
Returns the value of attribute now.
6 7 8 |
# File 'lib/a_series_of_tubes/tube_state/flash.rb', line 6 def now @now end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/a_series_of_tubes/tube_state/flash.rb', line 13 def [] key self.store[key] end |
#[]=(key, value) ⇒ Object
17 18 19 |
# File 'lib/a_series_of_tubes/tube_state/flash.rb', line 17 def []= key, value self.next[key] = value end |