class Ellen::Actions::Ping

Public Instance Methods

call() click to toggle source
# File lib/ellen/actions/ping.rb, line 4
def call
  message.reply(pong)
end

Private Instance Methods

ping() click to toggle source
# File lib/ellen/actions/ping.rb, line 10
def ping
  message.body[-4..-1]
end
pong() click to toggle source
# File lib/ellen/actions/ping.rb, line 14
def pong
  ping.gsub(/i/i, "i" => "o", "I" => "O")
end