Class: Maglev::ReservedPaths

Inherits:
Array
  • Object
show all
Defined in:
lib/maglev/reserved_paths.rb

Instance Method Summary collapse

Instance Method Details

#include?(value) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
# File 'lib/maglev/reserved_paths.rb', line 5

def include?(value)
  each do |path|
    return true if path == value ||
                   (path.include?('*') && value && File.fnmatch(path, value))
  end
  false
end