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 collapse
- @@_storage_object =
{}
Class Method Summary collapse
-
.get(key) ⇒ Object
Retrieve the value of the
key
. -
.set(key, value) ⇒ Object
Retrieve the value of the
key
.
Class Method Details
.get(key) ⇒ Object
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 |
.set(key, value) ⇒ Object
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 |