Method: Lita::Handlers::Meme#detect_meme

Defined in:
lib/lita/handlers/meme.rb

#detect_meme(response) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/lita/handlers/meme.rb', line 44

def detect_meme(response)
  input = response.matches[0][0]
  MEMES.each do |meme|
    match = meme[:regex].match(input)
    return reply(meme[:id], match, response) if match
  end
end