Class: TwitterTweetBot::Cache::Store
- Inherits:
-
Object
- Object
- TwitterTweetBot::Cache::Store
- Defined in:
- lib/twitter_tweet_bot/cache/store.rb
Instance Method Summary collapse
-
#initialize(name, provider) ⇒ Store
constructor
A new instance of Store.
- #read ⇒ Object
- #write(value) ⇒ Object
Constructor Details
#initialize(name, provider) ⇒ Store
Returns a new instance of Store.
8 9 10 11 |
# File 'lib/twitter_tweet_bot/cache/store.rb', line 8 def initialize(name, provider) @name = name @provider = provider end |
Instance Method Details
#read ⇒ Object
17 18 19 |
# File 'lib/twitter_tweet_bot/cache/store.rb', line 17 def read deserialize_value(provider.read(cache_key)) end |
#write(value) ⇒ Object
13 14 15 |
# File 'lib/twitter_tweet_bot/cache/store.rb', line 13 def write(value) provider.write(cache_key, serialize_value(value)) end |