class Lita::Handlers::Catme
Public Instance Methods
cat_bomb(response)
click to toggle source
# File lib/lita/handlers/catme.rb, line 13 def cat_bomb(response) count = (response.args[1] || 5).to_i count = 20 if count > 20 Cat.fetch(count: count).each { |cat| response.reply(cat.url) } end
cat_categories(response)
click to toggle source
# File lib/lita/handlers/catme.rb, line 20 def cat_categories(response) Cat.fetch_categories.each { |category| response.reply(category) } end
cat_me(response)
click to toggle source
# File lib/lita/handlers/catme.rb, line 9 def cat_me(response) response.reply(Cat.fetch.first.url) end
cat_with_category(response)
click to toggle source
# File lib/lita/handlers/catme.rb, line 24 def cat_with_category(response) if cat = Cat.fetch(category: response.args[1]).first response.reply(cat.url) else response.reply(t('cat_with_category.unrecognized_category')) end end