Class: ArchUnit::Common::Filter
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Common::Filter
- Defined in:
- lib/archunit/common/filter.rb
Overview
An immutable regular-expression filter with its matching target and exclusions.
Instance Attribute Summary collapse
-
#exclusions ⇒ Object
readonly
Returns the value of attribute exclusions.
-
#matching ⇒ Object
readonly
Returns the value of attribute matching.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(regexp:, target:, matching: :partial, exclusions: []) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(regexp:, target:, matching: :partial, exclusions: []) ⇒ Filter
Returns a new instance of Filter.
12 13 14 15 16 17 18 19 |
# File 'lib/archunit/common/filter.rb', line 12 def initialize(regexp:, target:, matching: :partial, exclusions: []) regexp = immutable_regexp(regexp) validate_member(target, FILTER_TARGETS, :target) validate_member(matching, FILTER_MATCHING_MODES, :matching) exclusions = immutable_exclusions(exclusions) super end |
Instance Attribute Details
#exclusions ⇒ Object (readonly)
Returns the value of attribute exclusions
11 12 13 |
# File 'lib/archunit/common/filter.rb', line 11 def exclusions @exclusions end |
#matching ⇒ Object (readonly)
Returns the value of attribute matching
11 12 13 |
# File 'lib/archunit/common/filter.rb', line 11 def matching @matching end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp
11 12 13 |
# File 'lib/archunit/common/filter.rb', line 11 def regexp @regexp end |
#target ⇒ Object (readonly)
Returns the value of attribute target
11 12 13 |
# File 'lib/archunit/common/filter.rb', line 11 def target @target end |