Class: Toggleable::StorageAbstract
- Inherits:
-
Object
- Object
- Toggleable::StorageAbstract
- Defined in:
- lib/toggleable/storage/abstract.rb
Overview
Toggleable::StorageAbstract describes the interface class for storage.
Direct Known Subclasses
Instance Method Summary collapse
-
#get(_key, _namespace: nil) ⇒ Object
the storage you provide must implement these methods namespace parameter is optional, only if you provide namespace configuration.
- #get_all(_namespace: nil) ⇒ Object
- #mass_set(_mappings, namespace: nil) ⇒ Object
- #set(_key, _value, _namespace: nil) ⇒ Object
- #set_if_not_exist(_key, _value, namespace: nil) ⇒ Object
Instance Method Details
#get(_key, _namespace: nil) ⇒ Object
the storage you provide must implement these methods namespace parameter is optional, only if you provide namespace configuration
9 10 11 |
# File 'lib/toggleable/storage/abstract.rb', line 9 def get(_key, _namespace: nil) raise NotImplementedError, "You must implement #{method_name}" end |
#get_all(_namespace: nil) ⇒ Object
13 14 15 |
# File 'lib/toggleable/storage/abstract.rb', line 13 def get_all(_namespace: nil) raise NotImplementedError, "You must implement #{method_name}" end |
#mass_set(_mappings, namespace: nil) ⇒ Object
25 26 27 |
# File 'lib/toggleable/storage/abstract.rb', line 25 def mass_set(_mappings, namespace: nil) raise NotImplementedError, "You must implement #{method_name}" end |
#set(_key, _value, _namespace: nil) ⇒ Object
17 18 19 |
# File 'lib/toggleable/storage/abstract.rb', line 17 def set(_key, _value, _namespace: nil) raise NotImplementedError, "You must implement #{method_name}" end |
#set_if_not_exist(_key, _value, namespace: nil) ⇒ Object
21 22 23 |
# File 'lib/toggleable/storage/abstract.rb', line 21 def set_if_not_exist(_key, _value, namespace: nil) raise NotImplementedError, "You must implement #{method_name}" end |