class Ruboty::BrainDictionary::Actions::Forget
Public Instance Methods
call()
click to toggle source
# File lib/ruboty/brain_dictionary/actions/forget.rb, line 7 def call message.reply(forget) end
Private Instance Methods
forget()
click to toggle source
# File lib/ruboty/brain_dictionary/actions/forget.rb, line 13 def forget dict = BrainDictionaryHelper.dictionary(message.robot) key = message[:key] ret = dict.delete(key) ret.nil? ? "no key '#{key}'" : "success delete key '#{key}'" rescue => e e.message end