123456789_123456789_123456789_123456789_123456789_

Class: SimpleCov::GlobFilter

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Filter
Instance Chain:
self, Filter
Inherits: SimpleCov::Filter
Defined in: lib/simplecov/filter.rb

Overview

Filter that matches when the source file's project path matches the configured shell glob (e.g. "lib/**/*.rb"). Used by cover and skip when callers want glob semantics instead of the substring match of StringFilter.

Class Method Summary

Instance Attribute Summary

Filter - Inherited

Instance Method Summary

Constructor Details

This class inherits a constructor from SimpleCov::Filter

Instance Method Details

#matches?(source_file) ⇒ Boolean

[ GitHub ]

  
# File 'lib/simplecov/filter.rb', line 115

def matches?(source_file)
  File.fnmatch?(filter_argument, source_file.project_filename, File::FNM_PATHNAME | File::FNM_EXTGLOB)
end