class Guard::Watcher::Pattern::Matcher
def ==(other)
-
(true, false)
- equal or not
Parameters:
-
other
(Guard::Watcher::Pattern::Matcher
) --
def ==(other) matcher == other.matcher end
def initialize(obj)
def initialize(obj) @matcher = obj end
def match(string_or_pathname)
def match(string_or_pathname) @matcher.match(normalized(string_or_pathname)) end
def normalized(string_or_pathname)
def normalized(string_or_pathname) path = Pathname.new(string_or_pathname).cleanpath return path.to_s if @matcher.is_a?(Regexp) path end