Class: Lita::Handlers::InspirebotTestSelly
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::InspirebotTestSelly
- Defined in:
- lib/lita/handlers/inspirebot_test_selly.rb
Instance Method Summary collapse
Instance Method Details
#authors(response) ⇒ Object
97 98 99 100 101 |
# File 'lib/lita/handlers/inspirebot_test_selly.rb', line 97 def (response) @quotes = ::InspirebotTestSelly::Quotes.new = @quotes..upcase response.reply "I know about the following authors: #{}. To hear quotes, type QUOTE {AUTHOR}" end |
#menu(response) ⇒ Object
114 115 116 117 |
# File 'lib/lita/handlers/inspirebot_test_selly.rb', line 114 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
103 104 105 106 107 108 109 110 111 112 |
# File 'lib/lita/handlers/inspirebot_test_selly.rb', line 103 def quote(response) @quotes = ::InspirebotTestSelly::Quotes.new = response.match_data[1].downcase if .downcase == 'authors' = @quotes..upcase response.reply "I know about the following authors: #{}. To hear quotes, type QUOTE {AUTHOR}" else response.reply @quotes.get_quote() end end |