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

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

Instance Attribute Summary

Attributes inherited from IgnoreDescriptor

#block, #path

Instance Method Summary collapse

Instance Method Details

#ignored?(match_path) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
65
66
67
68
# File 'lib/middleman-core/sitemap/extensions/ignores.rb', line 62

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