module SlackNotifySimple
Constants
- VERSION
Public Class Methods
call(url:, title:, message:, icon:)
click to toggle source
# File lib/slack_notify_simple.rb, line 6 def self.call(url:, title:, message:, icon:) uri = URI(url) contents = <<-EOS @channel: ``` #{message} ``` EOS hash = { "payload"=> { "username" => title, "text" => contents, "icon_emoji" => icon }.to_json } Net::HTTP.post_form(uri, hash) end