class Lita::Handlers::Doubler
Public Instance Methods
double_number(n)
click to toggle source
# File lib/lita/handlers/doubler.rb, line 10 def double_number(n) n + n end
respond_with_double(response)
click to toggle source
# File lib/lita/handlers/doubler.rb, line 14 def respond_with_double(response) n = response.match_data.captures.first n = Integer(n) response.reply "#{n} + #{n} = #{double_number(n)}" end