Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Created July 21, 2013 11:30
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 taiyoh/6048300 to your computer and use it in GitHub Desktop.
Save taiyoh/6048300 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# notification of im.kayac.com
# im.kayac.com経由で通知する
require 'im-kayac'
username = "foobar"
sig = "abababababa"
module Earthquake
module Core
def notify(message, options = {})
message = message.is_a?(String) ? message : message.inspect
screen_name = options.delete(:screen_name) || "earthquake";
message = "[#{screen_name}] #{message}"
ImKayac.to(username).secret(sig).post(message)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment