class Danger::FileList

Public Instance Methods

include?(pattern) click to toggle source

Information about pattern: ruby-doc.org/core-2.2.0/File.html#method-c-fnmatch e.g. “*/something.” for any file called something with any extension

# File lib/danger/core_ext/file_list.rb, line 9
def include?(pattern)
  self.each do |current|
    if !current.nil? && (File.fnmatch(pattern, current, File::FNM_EXTGLOB) || pattern == current)
      return true
    end
  end
  return false
end