Class: Workling::Return::Store::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/workling/return/store/base.rb

Overview

Base Class for Return Stores. Subclasses need to implement set and get.

Direct Known Subclasses

MemoryReturnStore, StarlingReturnStore

Instance Method Summary collapse

Instance Method Details

#get(key) ⇒ Object

get a value from the store. this should be destructive.

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/workling/return/store/base.rb', line 31

def get(key)
  raise NotImplementedError.new("get(key) not implemented in #{ self.class }")
end

#iterator(key) ⇒ Object



35
36
37
# File 'lib/workling/return/store/base.rb', line 35

def iterator(key)
  Workling::Return::Store::Iterator.new(key)
end

#set(key, value) ⇒ Object

set a value in the store with the given key.

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/workling/return/store/base.rb', line 26

def set(key, value)
  raise NotImplementedError.new("set(key, value) not implemented in #{ self.class }")
end