Sha256: 0e80f44ce4f64a079e563db92888065a00e944c10390db0129bb05520082c036
Contents?: true
Size: 515 Bytes
Versions: 18
Compression:
Stored size: 515 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, File::FNM_EXTGLOB) || pattern == current end end return false end end end
Version data entries
18 entries across 18 versions & 1 rubygems