Class: Lita::Handlers::Doge

Inherits:
Handler
  • Object
show all
Defined in:
lib/lita/handlers/doge.rb

Constant Summary collapse

ADJ =
[
  'such',
  'so',
  'very',
  'much'
]
WORDS =
[
  'wow',
  'doge',
  'tasty',
  'groovy'
]
DEFAULT_WORDS =
[
  'lita',
  'bot'
]
BASE_URL =
'http://dogr.io/'

Instance Method Summary collapse

Instance Method Details

#doge(r) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/lita/handlers/doge.rb', line 29

def doge(r)
  args = extract_args(r.matches)

  if args.empty?
    r.reply(build_such_wow(config.default_words || DEFAULT_WORDS))
  else
    r.reply(build_such_wow(args))
  end
end