class Lita::Handlers::OnewheelFredsSoundOfMusic

Public Instance Methods

format_output(response, records) click to toggle source
# File lib/lita/handlers/onewheel_freds_sound_of_music.rb, line 55
def format_output(response, records)
  records.each do |rec|
    query = "#{rec[:brand]} #{rec[:model]}".gsub /\s+/, '+'
    reply = "#{rec[:brand]} #{rec[:model]} was $#{rec[:was_new]}, now $#{rec[:price]}  https://www.google.com/#q=#{query}"
    Lita.logger.info "Responding with: #{reply}"
    response.reply reply
  end
end