Class: MollieBank::Storage
- Inherits:
-
Object
- Object
- MollieBank::Storage
- Defined in:
- lib/mollie-bank/application/storage.rb
Overview
The Storage class for storing a key value pair (without a database)
Constant Summary
- @@_storage_object =
{}
Class Method Summary (collapse)
-
+ (Object) get(key)
Retrieve the value of the key.
-
+ (Object) set(key, value)
Retrieve the value of the key.
Class Method Details
+ (Object) get(key)
Retrieve the value of the key
10 11 12 13 |
# File 'lib/mollie-bank/application/storage.rb', line 10 def self.get(key) return nil unless @@_storage_object.has_key?key @@_storage_object[key] end |
+ (Object) set(key, value)
Retrieve the value of the key
19 20 21 |
# File 'lib/mollie-bank/application/storage.rb', line 19 def self.set(key, value) @@_storage_object[key] = value end |