Class: GitWebhook::Notifier
- Inherits:
-
Object
- Object
- GitWebhook::Notifier
- Defined in:
- lib/git-webhook/notifier.rb
Instance Method Summary collapse
-
#initialize(data_hash) ⇒ Notifier
constructor
A new instance of Notifier.
- #notify(url) ⇒ Object
Constructor Details
#initialize(data_hash) ⇒ Notifier
Returns a new instance of Notifier.
9 10 11 |
# File 'lib/git-webhook/notifier.rb', line 9 def initialize(data_hash) @data_hash = data_hash end |
Instance Method Details
#notify(url) ⇒ Object
13 14 15 16 |
# File 'lib/git-webhook/notifier.rb', line 13 def notify(url) Net::HTTP.post_form(URI.parse(url), { :payload => @data_hash.to_json }) puts @data_hash.to_yaml end |