Sha256: 37bf3e8ac34cc872df75ebe91e613b54f67bf6ca9650c3a61bd678c9d9b0a5ea
Contents?: true
Size: 469 Bytes
Versions: 8
Compression:
Stored size: 469 Bytes
Contents
module Guard class Watcher class Pattern class Matcher def initialize(obj) @matcher = obj end def match(string_or_pathname) @matcher.match(normalized(string_or_pathname)) end private def normalized(string_or_pathname) path = Pathname.new(string_or_pathname).cleanpath return path.to_s if @matcher.is_a?(Regexp) path end end end end end
Version data entries
8 entries across 8 versions & 4 rubygems