class Lita::Handlers::Doubler
Public Instance Methods
double_number(n)
click to toggle source
START:doubler_method
# File lib/lita/handlers/doubler.rb, line 29 def double_number(n) n + n end
respond_with_double(response)
click to toggle source
START:handler
# File lib/lita/handlers/doubler.rb, line 19 def respond_with_double(response) # Read up on the Ruby MatchData class for more options n = response.match_data.captures.first n = Integer(n) response.reply "#{n} + #{n} = #{double_number n}" end