Class: Middleman::Sitemap::Extensions::Ignores::GlobIgnoreDescriptor

Inherits:
IgnoreDescriptor
  • Object
show all
Defined in:
middleman-core/lib/middleman-core/sitemap/extensions/ignores.rb

Instance Attribute Summary

Attributes inherited from IgnoreDescriptor

#block, #path

Instance Method Summary collapse

Methods inherited from IgnoreDescriptor

#execute_descriptor

Instance Method Details

#ignored?(match_path) ⇒ Boolean


58
59
60
61
62
63
64
# File 'middleman-core/lib/middleman-core/sitemap/extensions/ignores.rb', line 58

def ignored?(match_path)
  if defined?(::File::FNM_EXTGLOB)
    ::File.fnmatch(path, match_path, ::File::FNM_EXTGLOB)
  else
    ::File.fnmatch(path, match_path)
  end
end