Class: ArchUnit::Slices::FluentApi::ForbiddenSliceDependencyCondition
- Inherits:
-
Object
- Object
- ArchUnit::Slices::FluentApi::ForbiddenSliceDependencyCondition
- Includes:
- Common::FluentApi::Checkable
- Defined in:
- lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb
Overview
Executable slices should not contain dependency rule.
Instance Attribute Summary collapse
-
#project_locator ⇒ Object
readonly
Returns the value of attribute project_locator.
-
#projection ⇒ Object
readonly
Returns the value of attribute projection.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#source_slice ⇒ Object
readonly
Returns the value of attribute source_slice.
-
#target_slice ⇒ Object
readonly
Returns the value of attribute target_slice.
Instance Method Summary collapse
-
#initialize(scope, source_slice:, target_slice:) ⇒ ForbiddenSliceDependencyCondition
constructor
A new instance of ForbiddenSliceDependencyCondition.
- #negated? ⇒ Boolean
Methods included from Common::FluentApi::Checkable
Constructor Details
#initialize(scope, source_slice:, target_slice:) ⇒ ForbiddenSliceDependencyCondition
Returns a new instance of ForbiddenSliceDependencyCondition.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 17 def initialize(scope, source_slice:, target_slice:) unless scope.is_a?(SliceScopeBuilder) raise ArgumentError, 'scope must be a SliceScopeBuilder' end @scope = scope @project_locator = scope.project_locator @projection = scope.projection @source_slice = immutable_slice_name(source_slice, :source_slice) @target_slice = immutable_slice_name(target_slice, :target_slice) freeze end |
Instance Attribute Details
#project_locator ⇒ Object (readonly)
Returns the value of attribute project_locator.
15 16 17 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 15 def project_locator @project_locator end |
#projection ⇒ Object (readonly)
Returns the value of attribute projection.
15 16 17 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 15 def projection @projection end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
15 16 17 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 15 def scope @scope end |
#source_slice ⇒ Object (readonly)
Returns the value of attribute source_slice.
15 16 17 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 15 def source_slice @source_slice end |
#target_slice ⇒ Object (readonly)
Returns the value of attribute target_slice.
15 16 17 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 15 def target_slice @target_slice end |
Instance Method Details
#negated? ⇒ Boolean
30 31 32 |
# File 'lib/archunit/slices/fluentapi/forbidden_slice_dependency_condition.rb', line 30 def negated? true end |