class Lita::Handlers::Inspirebot

Public Instance Methods

authors(response) click to toggle source
# File lib/lita/handlers/inspirebot.rb, line 93
def authors(response)
  @quotes = ::Inspirebot::Quotes.new
  authors = @quotes.authors_string.upcase
  response.reply "I know about the following authors: #{authors}. To hear quotes, type QUOTE {AUTHOR}"
end
menu(response) click to toggle source
quote(response) click to toggle source
# File lib/lita/handlers/inspirebot.rb, line 99
def quote(response)
  @quotes = ::Inspirebot::Quotes.new
  author = response.match_data[1].downcase
  if author.downcase == 'authors'
    authors = @quotes.authors_string.upcase
    response.reply "I know about the following authors: #{authors}. To hear quotes, type QUOTE {AUTHOR}"
  else
    response.reply @quotes.get_quote(author)
  end
end