Class: Kayvee::Store
- Inherits:
-
Object
- Object
- Kayvee::Store
- Defined in:
- lib/kayvee/store.rb
Overview
Represents a simple key value store. Provides multiple backing stores.
Constant Summary collapse
- ClientNotFound =
Raised when a client implementation can not be found.
Class.new(Exception)
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
The internal client driving the store.
Instance Method Summary collapse
-
#get(path) ⇒ Key
(also: #[])
Gets a given keys value.
-
#initialize(client = :s3, options = {}) ⇒ Store
constructor
A new instance of Store.
-
#set(path, value) ⇒ Key
(also: #[]=)
Sets a given key to a given value.
Constructor Details
#initialize(client = :s3, options = {}) ⇒ Store
Returns a new instance of Store.
33 34 35 36 |
# File 'lib/kayvee/store.rb', line 33 def initialize(client = :s3, = {}) load_client(client) @client = instantiate_client(client, ) end |
Instance Attribute Details
#client ⇒ Object (readonly)
The internal client driving the store
24 25 26 |
# File 'lib/kayvee/store.rb', line 24 def client @client end |