module ChallengeStore
Constants
- KEY
- PLUGIN
Public Instance Methods
Source
# File lib/challenge_store.rb, line 23 def clear(network:, channel:, store: RabbotDb) store.set_plugin_json(plugin: PLUGIN, key: KEY, network: network, channel: channel, value: {}) end
Source
# File lib/challenge_store.rb, line 12 def get(network:, channel:, store: RabbotDb) data = store.get_plugin_json(plugin: PLUGIN, key: KEY, network: network, channel: channel, default: nil) return nil unless data.is_a?(Hash) && !data.empty? data end
Source
# File lib/challenge_store.rb, line 19 def save(network:, channel:, challenge:, store: RabbotDb) store.set_plugin_json(plugin: PLUGIN, key: KEY, network: network, channel: channel, value: challenge) end