Class: Lita::Handlers::Inspirebot
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::Inspirebot
- Defined in:
- lib/lita/handlers/inspirebot.rb
Instance Method Summary collapse
Instance Method Details
#authors(response) ⇒ Object
93 94 95 96 97 |
# File 'lib/lita/handlers/inspirebot.rb', line 93 def (response) @quotes = ::Inspirebot::Quotes.new = @quotes..upcase response.reply "I know about the following authors: #{authors}. To hear quotes, type QUOTE {AUTHOR}" end |
#menu(response) ⇒ Object
110 111 112 113 |
# File 'lib/lita/handlers/inspirebot.rb', line 110 def (response) help = 'use QUOTE AUTHORS to get a list of authors. use QUOTE {AUTHOR} to get a random quote from the author' response.reply @quotes.get_quote(help) end |
#quote(response) ⇒ Object
99 100 101 102 103 104 105 106 107 108 |
# File 'lib/lita/handlers/inspirebot.rb', line 99 def quote(response) @quotes = ::Inspirebot::Quotes.new = response.match_data[1].downcase if .downcase == 'authors' = @quotes..upcase response.reply "I know about the following authors: #{authors}. To hear quotes, type QUOTE {AUTHOR}" else response.reply @quotes.get_quote() end end |