Class: Datadog::Core::Remote::Dispatcher::Receiver

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

Overview

Store Matcher and block to be executed on a match

Instance Method Summary collapse

Constructor Details

#initialize(matcher, &block) ⇒ Receiver

Returns a new instance of Receiver.



24
25
26
27
# File 'lib/datadog/core/remote/dispatcher.rb', line 24

def initialize(matcher, &block)
  @block = block
  @matcher = matcher
end

Instance Method Details

#call(repository, changes) ⇒ Object



33
34
35
# File 'lib/datadog/core/remote/dispatcher.rb', line 33

def call(repository, changes)
  @block.call(repository, changes)
end

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/datadog/core/remote/dispatcher.rb', line 29

def match?(path)
  @matcher.match?(path)
end