Class: Danger::FileList

Inherits:
Object
  • Object
show all
Includes:
Helpers::ArraySublcass
Defined in:
lib/danger/core_ext/file_list.rb

Instance Method Summary collapse

Methods included from Helpers::ArraySublcass

#<=>, #initialize, #kind_of?, #method_missing, #respond_to_missing?, #to_a, #to_ary

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Danger::Helpers::ArraySublcass

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:



9
10
11
12
13
14
# File 'lib/danger/core_ext/file_list.rb', line 9

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