Last active
August 29, 2015 14:25
-
-
Save june29/c42bd796893d7312fe3a to your computer and use it in GitHub Desktop.
ruboty-clock.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Specification.new do |spec| | |
spec.name = "ruboty-clock" | |
spec.version = "0.0.1" | |
spec.authors = ["Jun OHWADA"] | |
spec.email = ["[email protected]"] | |
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