Class: Lita::Handlers::Catme
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::Catme
- Defined in:
- lib/lita/handlers/catme.rb
Instance Method Summary collapse
- #cat_bomb(response) ⇒ Object
- #cat_categories(response) ⇒ Object
- #cat_me(response) ⇒ Object
- #cat_with_category(response) ⇒ Object
Instance Method Details
#cat_bomb(response) ⇒ Object
13 14 15 16 17 18 |
# 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) ⇒ Object
20 21 22 |
# File 'lib/lita/handlers/catme.rb', line 20 def cat_categories(response) Cat.fetch_categories.each { |category| response.reply(category) } end |