Base¶
base
¶
Core specification abstraction.
Provides the foundational specification contract without any composition
implementation details or dependencies.
Specification
¶
Bases: ABC
Abstract predicate over a candidate object.
Specifications encapsulate business rules that can be evaluated
against an object of type T.
This is the minimal contract: only is_satisfied_by().
Composition (and_, or_, not_) is added by ComposableSpecification.
Source code in src/forging_blocks/foundation/specification/base.py
is_satisfied_by(candidate: T) -> bool
abstractmethod
¶
Determine whether the candidate satisfies this specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candidate
|
T
|
The object to evaluate. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the candidate satisfies this specification, False otherwise. |