Class: ArchUnit::Common::Assertion::EmptyTestViolation
- Defined in:
- lib/archunit/common/assertion/empty_test_violation.rb
Overview
Data describing a rule whose selectors matched no candidates.
Instance Attribute Summary collapse
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#is_negated ⇒ Object
readonly
Returns the value of attribute is_negated.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(filters:, is_negated: false) ⇒ EmptyTestViolation
constructor
A new instance of EmptyTestViolation.
- #negated? ⇒ Boolean
Constructor Details
#initialize(filters:, is_negated: false) ⇒ EmptyTestViolation
Returns a new instance of EmptyTestViolation.
13 14 15 16 17 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 13 def initialize(filters:, is_negated: false) @filters = immutable_filters(filters) @is_negated = boolean(is_negated, :is_negated) super() end |
Instance Attribute Details
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
11 12 13 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 11 def filters @filters end |
#is_negated ⇒ Object (readonly)
Returns the value of attribute is_negated.
11 12 13 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 11 def is_negated @is_negated end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
23 24 25 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 23 def ==(other) other.is_a?(self.class) && filters == other.filters && is_negated == other.is_negated end |
#hash ⇒ Object
28 29 30 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 28 def hash [self.class, filters, is_negated].hash end |
#negated? ⇒ Boolean
19 20 21 |
# File 'lib/archunit/common/assertion/empty_test_violation.rb', line 19 def negated? is_negated end |