Class: Lita::Handlers::DecoreDoubler

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

Instance Method Summary collapse

Instance Method Details

#double(response) ⇒ Object



11
12
13
14
15
16
# File 'lib/lita/handlers/decore_doubler.rb', line 11

def double(response)
  n = response.matches.first.first
  n = Integer(n)

  response.reply "#{n} + #{n} = #{n+n}"
end