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

Defined Under Namespace

Classes: Product

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Matcher

Returns a new instance of Matcher.



81
82
83
# File 'lib/datadog/core/remote/dispatcher.rb', line 81

def initialize(&block)
  @block = block
end

Instance Method Details

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)


85
86
87
# File 'lib/datadog/core/remote/dispatcher.rb', line 85

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