Skip to content

Instantly share code, notes, and snippets.

@june29
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save june29/c42bd796893d7312fe3a to your computer and use it in GitHub Desktop.
Save june29/c42bd796893d7312fe3a to your computer and use it in GitHub Desktop.
ruboty-clock.rb
require "time"
module Ruboty
module Handlers
class Clock < Base
on(
/clock\z/i,
name: "clock",
description: "Say current time"
)
def clock(message)
message.reply(Time.now.to_s)
end
end
end
end
Gem::Specification.new do |spec|
spec.name = "ruboty-clock"
spec.version = "0.0.1"
spec.authors = ["Jun OHWADA"]
spec.email = ["june29.jp@gmail.com"]
spec.summary = "Say current time"
spec.files = ["ruboty-clock.rb"]
spec.require_path = "."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment