class Core::Watch::Callbacks::Regexp
- public
-
Callback
that wraps a regular expression.
Public Class Methods
new(regexp, **kwargs, &block)
click to toggle source
Calls superclass method
Core::Watch::Callback::new
# File lib/core/watch/callbacks/regexp.rb, line 13 def initialize(regexp, **kwargs, &block) super(**kwargs, &block) @regexp = regexp end
Public Instance Methods
match?(path)
click to toggle source
- public
-
Return `true` if this callback matches the path.
# File lib/core/watch/callbacks/regexp.rb, line 21 def match?(path) @regexp.match?(path.to_s) end