Class: SimpleCov::Result::FilterConfig
- Inherits:
-
Object
- Object
- SimpleCov::Result::FilterConfig
- 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
-
#cover_filters ⇒ Object
readonly
Returns the value of attribute cover_filters.
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
Instance Method Summary collapse
-
#initialize(filters: SimpleCov.filters, cover_filters: SimpleCov.cover_filters, groups: SimpleCov.groups) ⇒ FilterConfig
constructor
A new instance of FilterConfig.
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_filters ⇒ Object (readonly)
Returns the value of attribute cover_filters.
41 42 43 |
# File 'lib/simplecov/result.rb', line 41 def cover_filters @cover_filters end |
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
41 42 43 |
# File 'lib/simplecov/result.rb', line 41 def filters @filters end |
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
41 42 43 |
# File 'lib/simplecov/result.rb', line 41 def groups @groups end |