Class: ASeriesOfTubes::TubeState::Flash

Inherits:
Object
  • Object
show all
Defined in:
lib/a_series_of_tubes/tube_state/flash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nextObject (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

#nowObject (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