Class: Datadog::Core::Remote::Dispatcher::Receiver
- Inherits:
-
Object
- Object
- Datadog::Core::Remote::Dispatcher::Receiver
- Defined in:
- lib/datadog/core/remote/dispatcher.rb
Overview
Store Matcher and block to be executed on a match
Instance Method Summary collapse
- #call(repository, changes) ⇒ Object
-
#initialize(matcher, &block) ⇒ Receiver
constructor
A new instance of Receiver.
- #match?(path) ⇒ Boolean
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
29 30 31 |
# File 'lib/datadog/core/remote/dispatcher.rb', line 29 def match?(path) @matcher.match?(path) end |