Class: ArchUnit::Slices::FluentApi::NegativeSliceConditionBuilder
- Inherits:
-
Object
- Object
- ArchUnit::Slices::FluentApi::NegativeSliceConditionBuilder
- Defined in:
- lib/archunit/slices/fluentapi/negative_slice_condition_builder.rb
Overview
Immutable negated mood for forbidden slice dependencies.
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #contain_dependency(source_slice, target_slice) ⇒ Object
-
#initialize(scope) ⇒ NegativeSliceConditionBuilder
constructor
A new instance of NegativeSliceConditionBuilder.
Constructor Details
#initialize(scope) ⇒ NegativeSliceConditionBuilder
Returns a new instance of NegativeSliceConditionBuilder.
12 13 14 15 16 17 18 19 |
# File 'lib/archunit/slices/fluentapi/negative_slice_condition_builder.rb', line 12 def initialize(scope) unless scope.is_a?(SliceScopeBuilder) raise ArgumentError, 'scope must be a SliceScopeBuilder' end @scope = scope freeze end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
10 11 12 |
# File 'lib/archunit/slices/fluentapi/negative_slice_condition_builder.rb', line 10 def scope @scope end |
Instance Method Details
#contain_dependency(source_slice, target_slice) ⇒ Object
21 22 23 |
# File 'lib/archunit/slices/fluentapi/negative_slice_condition_builder.rb', line 21 def contain_dependency(source_slice, target_slice) ForbiddenSliceDependencyCondition.new(scope, source_slice:, target_slice:) end |