Class: Slackoff::Webhook

Inherits:
Object
  • Object
show all
Defined in:
lib/slackoff.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Webhook

Returns a new instance of Webhook.



13
14
15
# File 'lib/slackoff.rb', line 13

def initialize(uri)
  @uri = URI(uri)
end

Instance Method Details

#send(message) ⇒ Object



17
18
19
20
# File 'lib/slackoff.rb', line 17

def send(message)
  connection = Slackoff::HTTPS.new(@uri)
  connection.send message
end