Class: Lita::Handlers::Bus

Inherits:
Handler
  • Object
show all
Defined in:
lib/lita/handlers/bus.rb

Instance Method Summary collapse

Instance Method Details

#toss(response) ⇒ Object



10
11
12
13
# File 'lib/lita/handlers/bus.rb', line 10

def toss(response)
	tossee = /^(?:throw|toss)\s+(.+)\s+under (the|a) bus/i.match(response.message.body)[1]
  response.reply(render_template("bus", tosser: response.message.source.user.name, tossee: tossee))
end