Class: MixinBot::BotAuth::MapCache
- Inherits:
-
Object
- Object
- MixinBot::BotAuth::MapCache
- Defined in:
- lib/mixin_bot/bot_auth.rb
Instance Method Summary collapse
- #delete(key) ⇒ Object
- #get(key) ⇒ Object
-
#initialize ⇒ MapCache
constructor
A new instance of MapCache.
- #put(key, value) ⇒ Object
Constructor Details
#initialize ⇒ MapCache
Returns a new instance of MapCache.
7 8 9 |
# File 'lib/mixin_bot/bot_auth.rb', line 7 def initialize @store = {} end |
Instance Method Details
#delete(key) ⇒ Object
19 20 21 |
# File 'lib/mixin_bot/bot_auth.rb', line 19 def delete(key) @store.delete(key) end |
#get(key) ⇒ Object
11 12 13 |
# File 'lib/mixin_bot/bot_auth.rb', line 11 def get(key) @store[key] end |
#put(key, value) ⇒ Object
15 16 17 |
# File 'lib/mixin_bot/bot_auth.rb', line 15 def put(key, value) @store[key] = value end |