module BootSlackBot

Constants

VERSION

Attributes

config[RW]

Public Instance Methods

configure() { |config| ... } click to toggle source
# File lib/boot_slack_bot/configuration.rb, line 17
def configure
  yield config
end
json_headers() click to toggle source
# File lib/boot_slack_bot/api.rb, line 12
def json_headers
  { 'Content-Type' => 'application/json' }
end
say(message, web_hook = BootSlackBot.config.slack_hook, headers = json_headers) click to toggle source
# File lib/boot_slack_bot/api.rb, line 4
def say(message, web_hook = BootSlackBot.config.slack_hook, headers = json_headers)
  if web_hook.blank?
    raise StandardError, 'Web Hook URL is blank !'
  else
    HTTParty.post(web_hook, payload: { text: message }.to_json, headers: json_headers)
  end
end