Sha256: 00e01eff4022edbe954653088da35f62499b087f7ac87a83e84f9efac0e64de8

Contents?: true

Size: 529 Bytes

Versions: 4

Compression:

Stored size: 529 Bytes

Contents

module MollieBank
  # The Storage class for storing a key value pair (without a database)
  class Storage
    @@_storage_object = {}

    # Retrieve the value of the +key+
    #
    # @param [Object] key
    # @return [Object] value
    def self.get(key)
      return nil unless @@_storage_object.has_key?key
      @@_storage_object[key]
    end

    # Retrieve the value of the +key+
    #
    # @param [Object] key
    # @param [Object] value
    def self.set(key, value)
      @@_storage_object[key] = value
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mollie-bank-0.0.5 lib/mollie-bank/application/storage.rb
mollie-bank-0.0.4 lib/mollie-bank/application/storage.rb
mollie-bank-0.0.3 lib/mollie-bank/application/storage.rb
mollie-bank-0.0.2 lib/mollie-bank/application/storage.rb