Module: TrelloWebhook::Processor

Extended by:
ActiveSupport::Concern
Defined in:
lib/trello_webhook/processor.rb

Defined Under Namespace

Classes: CallbackNotImplementedError, SignatureError, UnspecifiedWebhookSecretError

Instance Method Summary collapse

Instance Method Details

#createObject



12
13
14
15
16
17
18
19
# File 'lib/trello_webhook/processor.rb', line 12

def create
  if self.respond_to? event
    self.send event, json_body
    head(:ok)
  else
    fail CallbackNotImplementedError, "#{self.class.name}##{event} not implemented"
  end
end

#showObject



21
22
23
24
25
26
27
# File 'lib/trello_webhook/processor.rb', line 21

def show
  if request.head?
    puts "[TrelloWebhook::Processor] Hook ping received"
    p request_body
    head :ok
  end
end