Class: SimpleCov::Result::FilterConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/simplecov/result.rb

Overview

Bundles the filter and grouping configuration a Result applies to its source files after building them. Each field defaults to the SimpleCov singleton’s configuration, so ordinary callers never construct one; tests pass a custom instance to opt out of (or extend) the project’s filters or groups (e.g. ‘filters: []` to keep every file). Grouping the three together keeps Result#initialize’s parameter list small.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filters: SimpleCov.filters, cover_filters: SimpleCov.cover_filters, groups: SimpleCov.groups) ⇒ FilterConfig

Returns a new instance of FilterConfig.



43
44
45
46
47
# File 'lib/simplecov/result.rb', line 43

def initialize(filters: SimpleCov.filters, cover_filters: SimpleCov.cover_filters, groups: SimpleCov.groups)
  @filters = filters
  @cover_filters = cover_filters
  @groups = groups
end

Instance Attribute Details

#cover_filtersObject (readonly)

Returns the value of attribute cover_filters.



41
42
43
# File 'lib/simplecov/result.rb', line 41

def cover_filters
  @cover_filters
end

#filtersObject (readonly)

Returns the value of attribute filters.



41
42
43
# File 'lib/simplecov/result.rb', line 41

def filters
  @filters
end

#groupsObject (readonly)

Returns the value of attribute groups.



41
42
43
# File 'lib/simplecov/result.rb', line 41

def groups
  @groups
end