Class: Cybertrain::FlashNow

Inherits:
Object
  • Object
show all
Defined in:
cybertrain/flash.rb

Overview

What Cybertrain::Flash#now returns: writes go to the current request only.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ String?

Parameters:

  • key (String, Symbol)

Returns:

  • (String, nil)


132
133
134
# File 'cybertrain/flash.rb', line 132

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

#[]=(key, value) ⇒ Object

Parameters:

  • key (String, Symbol)
  • value (Object) —

    stored as value.to_s



139
140
141
# File 'cybertrain/flash.rb', line 139

def []=(key, value)
  @flash.set_now(key, value)
end