Class: Lita::Handlers::Compliment
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::Compliment
- Defined in:
- lib/lita/handlers/compliment.rb
Constant Summary collapse
- FIRST =
%w( BEAUTIFUL BUBBLY CHARMING CHEERFUL CONSIDERATE COURAGEOUS DEVOTED FABULOUS GALLANT GLOWING HAPPY PRECIOUS MARVELOUS PLEASANT RADIANT SHINING SUPPORTIVE VALIANT WITTY )
- SECOND =
%w( AGREEABLE BREATHTAKING CAPABLE CLEAN ELEGANT ENCHANTING ENTHUSIASTIC GIFTED GRACEFUL HARDY HIGH-CLASS INNOCENT LIKABLE LOYAL NOBLE PURE RESILIENT VIGOROUS )
- THIRD =
%w( KITTEN PUPPY FLUFFBALL LEADER FRIEND LOVER PERFORMER PLAYER WIZARD TEACHER HIPSTER GANGSTER STAR SERVANT DOMINATOR GO-GETTER MATE EMPLOYEE CHAMP )
Instance Method Summary collapse
Instance Method Details
#compliment(response) ⇒ Object
78 79 80 81 82 83 84 |
# File 'lib/lita/handlers/compliment.rb', line 78 def compliment(response) name = response.matches.first.first name = "<#{name}>" if name.start_with?("@") nice_thing = "#{FIRST.sample} #{SECOND.sample} #{THIRD.sample}" response.reply("#{name} you are a #{nice_thing}") end |