Class: ActiveWebhook::Hook

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_webhook/hook.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



4
5
6
# File 'lib/active_webhook/hook.rb', line 4

def body
  @body
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



4
5
6
# File 'lib/active_webhook/hook.rb', line 4

def headers
  @headers
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



4
5
6
# File 'lib/active_webhook/hook.rb', line 4

def url
  @url
end

Class Method Details

.from_h(url: '', headers: {}, body: "") ⇒ Object



5
6
7
# File 'lib/active_webhook/hook.rb', line 5

def self.from_h(url: '', headers: {}, body: "")
  new url, headers, body
end