Class: FmRest::TokenStore::Memory
- Defined in:
- lib/fmrest/token_store/memory.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #delete(key) ⇒ Object
-
#initialize(*args) ⇒ Memory
constructor
A new instance of Memory.
- #load(key) ⇒ Object
- #store(key, value) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Memory
Returns a new instance of Memory.
8 9 10 11 |
# File 'lib/fmrest/token_store/memory.rb', line 8 def initialize(*args) super @@tokens ||= {} end |
Instance Method Details
#delete(key) ⇒ Object
13 14 15 |
# File 'lib/fmrest/token_store/memory.rb', line 13 def delete(key) @@tokens.delete(key) end |
#load(key) ⇒ Object
17 18 19 |
# File 'lib/fmrest/token_store/memory.rb', line 17 def load(key) @@tokens[key] end |
#store(key, value) ⇒ Object
21 22 23 |
# File 'lib/fmrest/token_store/memory.rb', line 21 def store(key, value) @@tokens[key] = value end |