Class: Core::Watch::Callbacks::Path
- Inherits:
-
Core::Watch::Callback
- Object
- Core::Watch::Callback
- Core::Watch::Callbacks::Path
- Defined in:
- lib/core/watch/callbacks/path.rb
Overview
- public
-
Callback that wraps a path.
Instance Method Summary collapse
-
#initialize(value, **kwargs, &block) ⇒ Path
constructor
A new instance of Path.
-
#match?(path) ⇒ Boolean
- public
-
Return ‘true` if this callback matches the path.
Methods inherited from Core::Watch::Callback
Constructor Details
#initialize(value, **kwargs, &block) ⇒ Path
11 12 13 14 15 |
# File 'lib/core/watch/callbacks/path.rb', line 11 def initialize(value, **kwargs, &block) super(**kwargs, &block) @path = Pathname(value.to_s) end |
Instance Method Details
#match?(path) ⇒ Boolean
- public
-
Return ‘true` if this callback matches the path.
19 20 21 |
# File 'lib/core/watch/callbacks/path.rb', line 19 def match?(path) @path == path end |