Class: Danger::FileList

Inherits:
Array
  • Object
show all
Defined in:
lib/danger/core_ext/file_list.rb

Instance Method Summary collapse

Instance Method Details

#include?(pattern) ⇒ Boolean

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

Returns:

  • (Boolean)

6
7
8
9
10
11
# File 'lib/danger/core_ext/file_list.rb', line 6

def include?(pattern)
  self.each do |current|
    return true if File.fnmatch(pattern, current)
  end
  return false
end