Sha256: e317a42715706967be156d685b6cbc81c4f3f2320b15b93522827ae7e837af23
Contents?: true
Size: 496 Bytes
Versions: 15
Compression:
Stored size: 496 Bytes
Contents
require "danger/helpers/array_subclass" module Danger class FileList include Helpers::ArraySubclass # Information about pattern: http://ruby-doc.org/core-2.2.0/File.html#method-c-fnmatch # e.g. "**/something.*" for any file called something with any extension def include?(pattern) self.each do |current| unless current.nil? return true if File.fnmatch(pattern, current) || pattern == current end end return false end end end
Version data entries
15 entries across 15 versions & 1 rubygems