class DNS::Monitor::GChat
Public Class Methods
new(webhook_url)
click to toggle source
# File lib/dns/monitor/gchat.rb, line 4 def initialize(webhook_url) @webhook_url = webhook_url end
Public Instance Methods
message(text)
click to toggle source
# File lib/dns/monitor/gchat.rb, line 8 def message(text) Net::HTTP.post( URI(@webhook_url), {text: text}.to_json, 'Content-Type' => 'application/json' ) end