Class: Jackal::Stacks::Formatter::Webhook

Inherits:
Formatter
  • Object
show all
Defined in:
lib/jackal-stacks/formatter/webhook.rb

Overview

Format webhook data for stacks

Constant Summary collapse

SOURCE =
'webhook'
DESTINATION =
'stacks'

Instance Method Summary collapse

Instance Method Details

#format(payload) ⇒ Object

Format payload

Parameters:

  • payload (Smash)


15
16
17
18
19
20
21
# File 'lib/jackal-stacks/formatter/webhook.rb', line 15

def format(payload)
  if(payload.get(:data, :webhook, :query, :template))
    payload.set(:data, :stacks, :template,
      payload.get(:data, :webhook, :query, :template)
    )
  end
end