Class: ArchUnit::Files::Assertion::FilePatternViolation
- Inherits:
-
Common::Assertion::Violation
- Object
- Common::Assertion::Violation
- ArchUnit::Files::Assertion::FilePatternViolation
- Defined in:
- lib/archunit/files/assertion/matching_files.rb
Overview
Data describing a selected file that disagrees with a pattern predicate.
Instance Attribute Summary collapse
-
#check_filter ⇒ Object
readonly
Returns the value of attribute check_filter.
-
#is_negated ⇒ Object
readonly
Returns the value of attribute is_negated.
-
#projected_node ⇒ Object
readonly
Returns the value of attribute projected_node.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(check_filter:, projected_node:, is_negated: false) ⇒ FilePatternViolation
constructor
A new instance of FilePatternViolation.
- #negated? ⇒ Boolean
Constructor Details
#initialize(check_filter:, projected_node:, is_negated: false) ⇒ FilePatternViolation
Returns a new instance of FilePatternViolation.
16 17 18 19 20 21 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 16 def initialize(check_filter:, projected_node:, is_negated: false) @check_filter = filter_value(check_filter) @projected_node = node_value(projected_node) @is_negated = boolean_value(is_negated) super() end |
Instance Attribute Details
#check_filter ⇒ Object (readonly)
Returns the value of attribute check_filter.
14 15 16 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 14 def check_filter @check_filter end |
#is_negated ⇒ Object (readonly)
Returns the value of attribute is_negated.
14 15 16 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 14 def is_negated @is_negated end |
#projected_node ⇒ Object (readonly)
Returns the value of attribute projected_node.
14 15 16 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 14 def projected_node @projected_node end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
27 28 29 30 31 32 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 27 def ==(other) other.is_a?(self.class) && check_filter == other.check_filter && projected_node == other.projected_node && is_negated == other.is_negated end |
#hash ⇒ Object
35 36 37 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 35 def hash [self.class, check_filter, projected_node, is_negated].hash end |
#negated? ⇒ Boolean
23 24 25 |
# File 'lib/archunit/files/assertion/matching_files.rb', line 23 def negated? is_negated end |