Sha256: 64591ed6213891ac3dccc110ac25d8414089e56e57395333d77010dba23c1c27
Contents?: true
Size: 414 Bytes
Versions: 11
Compression:
Stored size: 414 Bytes
Contents
module Goodcheck class Glob attr_reader :pattern attr_reader :encoding def initialize(pattern:, encoding:) @pattern = pattern @encoding = encoding end def test(path) path.fnmatch?(pattern, File::FNM_PATHNAME | File::FNM_EXTGLOB) end def ==(other) other.is_a?(Glob) && other.pattern == pattern && other.encoding == encoding end end end
Version data entries
11 entries across 11 versions & 1 rubygems