Sha256: 3878e2e7ec5d2ffadb518800e6cbe9313aed2e97e36b7b8aaf7cd23d40d5ac70
Contents?: true
Size: 499 Bytes
Versions: 35
Compression:
Stored size: 499 Bytes
Contents
module Guard class Watcher class Pattern class SimplePath def initialize(string_or_pathname) @path = normalize(string_or_pathname) end def match(string_or_pathname) cleaned = normalize(string_or_pathname) return nil unless @path == cleaned [cleaned] end protected def normalize(string_or_pathname) Pathname.new(string_or_pathname).cleanpath.to_s end end end end end
Version data entries
35 entries across 35 versions & 8 rubygems