Module: Slackhook

Defined in:
lib/slackhook.rb,
lib/slackhook/version.rb

Constant Summary collapse

VERSION =
"1.0"

Class Method Summary collapse

Class Method Details

.send_hook(options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/slackhook.rb', line 6

def self.send_hook options
    # Send message to Slack
    #
    # Example:
    #   >> Slackhook.send_hook({webhook_url: "your_webhook_url", text: "message", channel: "@urielable", username: "testbot"})
    #   => "200"
    #
    # Arguments:
    #   webhook_url: (String)
    #   text: (String)
    #   channel: (String)
    #   username: (String)

  WebhookService::Webhook.new(options).send
end