Class: Datadog::Core::Remote::Dispatcher::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/remote/dispatcher.rb

Overview

Matcher checks if the path matches

Direct Known Subclasses

Product

Defined Under Namespace

Classes: Product

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Matcher

Returns a new instance of Matcher.



40
41
42
# File 'lib/datadog/core/remote/dispatcher.rb', line 40

def initialize(&block)
  @block = block
end

Instance Method Details

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/datadog/core/remote/dispatcher.rb', line 44

def match?(path)
  @block.call(path)
end