Module: Yake::Datadog::DSL

Includes:
Yake::DSL
Defined in:
lib/yake/datadog.rb

Overview

Datadog DSL

Instance Method Summary collapse

Methods included from Yake::DSL

#handler, #logger, #logging

Instance Method Details

#datadog(name, &block) ⇒ Object

Datadog handler wrapper



51
52
53
54
55
56
57
58
# File 'lib/yake/datadog.rb', line 51

def datadog(name, &block)
  define_method(name) do |event: nil, context: nil|
    context ||= MockContext.new
    ::Datadog::Lambda.wrap(event, context) do
      Yake.wrap(event, context, &block)
    end
  end
end