Module: Yake::Datadog::DSL

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

Instance Method Summary collapse

Methods included from Yake::DSL

#handler, #logger, #logging

Instance Method Details

#datadog(name, &block) ⇒ Object

Datadog handler wrapper


48
49
50
51
52
53
54
55
# File 'lib/yake/datadog.rb', line 48

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