class Ruboty::BrainDictionary::Actions::Dict
Public Instance Methods
call()
click to toggle source
# File lib/ruboty/brain_dictionary/actions/dict.rb, line 7 def call dict_message = dict return if dict_message.empty? message.reply(dict_message) end
Private Instance Methods
dict()
click to toggle source
# File lib/ruboty/brain_dictionary/actions/dict.rb, line 15 def dict d = BrainDictionaryHelper.dictionary(message.robot) key = message[:key] return if (key.nil? || key.empty?) d.key?(key) ? d[key] : '' rescue => e e.message end