class Twitch::Bot::Memory::Hash
Implement an ephemeral memory using a Hash
Attributes
client[R]
kvstore[R]
Public Class Methods
new(client:)
click to toggle source
# File lib/twitch/bot/memory/hash.rb, line 9 def initialize(client:) @client = client @kvstore = {} end
Public Instance Methods
retrieve(key)
click to toggle source
# File lib/twitch/bot/memory/hash.rb, line 18 def retrieve(key) kvstore[key] end
store(key, value)
click to toggle source
# File lib/twitch/bot/memory/hash.rb, line 14 def store(key, value) kvstore[key] = value end