Class: ConfigCat::InMemoryConfigCache
- Inherits:
-
ConfigCache
- Object
- ConfigCache
- ConfigCat::InMemoryConfigCache
- Defined in:
- lib/configcat/configcache.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize ⇒ InMemoryConfigCache
constructor
A new instance of InMemoryConfigCache.
- #set(key, value) ⇒ Object
Constructor Details
#initialize ⇒ InMemoryConfigCache
Returns a new instance of InMemoryConfigCache.
20 21 22 |
# File 'lib/configcat/configcache.rb', line 20 def initialize @value = {} end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/configcat/configcache.rb', line 19 def value @value end |
Instance Method Details
#get(key) ⇒ Object
24 25 26 |
# File 'lib/configcat/configcache.rb', line 24 def get(key) return @value.fetch(key, nil) end |
#set(key, value) ⇒ Object
28 29 30 |
# File 'lib/configcat/configcache.rb', line 28 def set(key, value) @value[key] = value end |