Top Level Namespace
Defined Under Namespace
Modules: PostCommit
Instance Method Summary collapse
-
#post_commit(service, &block) ⇒ Object
Send a notification to the specified service.
Instance Method Details
#post_commit(service, &block) ⇒ Object
Send a notification to the specified service. This method is just a shorcut to the PostCommit::Hooks module.
post_commit :twitter do
:username => "johndoe", :password => "test"
post "Some message!"
end
24 25 26 27 28 29 30 31 32 |
# File 'lib/post_commit.rb', line 24 def post_commit(service, &block) hook_class = PostCommit::Hooks.hooks[service.to_sym] raise PostCommit::UnknownHookError unless hook_class hook = hook_class.new hook.instance_eval(&block) hook end |