Sha256: f1e2ea18293c0eaf7bed822e487ff3223f2e0d51a9f16b6ca204a39a9095fb3a
Contents?: true
Size: 450 Bytes
Versions: 44
Compression:
Stored size: 450 Bytes
Contents
module CC class Workspace class Exclusion def initialize(pattern) @pattern = simplify(pattern) end def expand if glob? Dir.glob(pattern) else [pattern] end end def glob? pattern.include?("*") end private attr_reader :pattern def simplify(pattern) pattern.to_s.sub(%r{(/\*\*)?(/\*)?$}, "") end end end end
Version data entries
44 entries across 44 versions & 1 rubygems