Class: Hecks::Bluebook::Aggregate
- Inherits:
-
Object
- Object
- Hecks::Bluebook::Aggregate
- Includes:
- Behaviour::Aggregate, Construct, IR
- Defined in:
- lib/hecks/bluebook/aggregate.rb
Overview
A construct like every other: the aggregate carries its own identity and sits in the owner chain between its chapter (a Bluebook) and everything declared on it. The chain is model objects end to end — reference resolution and hecks_fqn both walk it.
THE HOLDING HALF, and nothing else. Every line below restates what
language/bluebook/aggregate.bluebook already declares — the field
list, said again as readers, again as constructor keywords, and
again as an emission. That triplication is what a generator removes;
Behaviour::Aggregate carries everything that is NOT derivable from
the declaration, so regenerating this file can never be lossy.
PROTOTYPE: hand-written in the shape a generator would emit, to
prove the seam before the generator exists. bin/project_model
would own this file; behaviour/aggregate.rb stays hand-written.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#entities ⇒ Object
readonly
Returns the value of attribute entities.
-
#identified_by ⇒ Object
readonly
Returns the value of attribute identified_by.
-
#identity_heads ⇒ Object
readonly
Returns the value of attribute identity_heads.
-
#identity_paths ⇒ Object
readonly
Returns the value of attribute identity_paths.
-
#invariants ⇒ Object
readonly
Returns the value of attribute invariants.
-
#lifecycle ⇒ Object
readonly
Returns the value of attribute lifecycle.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#policies ⇒ Object
readonly
Returns the value of attribute policies.
-
#ports ⇒ Object
readonly
Returns the value of attribute ports.
-
#preconditions ⇒ Object
readonly
Returns the value of attribute preconditions.
-
#projected_fields ⇒ Object
readonly
Returns the value of attribute projected_fields.
-
#provenance ⇒ Object
readonly
Returns the value of attribute provenance.
-
#queries ⇒ Object
readonly
Returns the value of attribute queries.
-
#reference_targets ⇒ Object
readonly
Returns the value of attribute reference_targets.
-
#value_objects ⇒ Object
readonly
Returns the value of attribute value_objects.
Attributes included from Construct
#hecks_name, #hecks_owner, #hecks_root
Instance Method Summary collapse
-
#initialize(name:, description: nil, attributes: [], value_objects: [], commands: [], invariants: [], preconditions: [], projected_fields: [], identified_by: [], lifecycle: nil, entities: [], queries: [], policies: [], ports: [], reference_targets: [], provenance: nil) ⇒ Aggregate
constructor
Assigns what the language declares, then hands off to the behaviour's own
settle— derived identity, name indexes and owner stamping, none of which the declaration states.
Methods included from Behaviour::Aggregate
#add_port, #hecks_separator, #index_declarations, #port, #projected_field, #settle, #storage_name, #value_object
Methods included from Behaviour::Owns
Methods included from Behaviour::Indexed
#attribute, #command, #index_attributes, #index_by_hecks_name, #query
Methods included from Behaviour::Identified
Methods included from IR
Methods included from Construct
#hecks_fqn, #hecks_root?, #hecks_separator
Constructor Details
#initialize(name:, description: nil, attributes: [], value_objects: [], commands: [], invariants: [], preconditions: [], projected_fields: [], identified_by: [], lifecycle: nil, entities: [], queries: [], policies: [], ports: [], reference_targets: [], provenance: nil) ⇒ Aggregate
Assigns what the language declares, then hands off to the
behaviour's own settle — derived identity, name indexes and
owner stamping, none of which the declaration states.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/hecks/bluebook/aggregate.rb', line 82 def initialize(name:, description: nil, attributes: [], value_objects: [], commands: [], invariants: [], preconditions: [], projected_fields: [], identified_by: [], lifecycle: nil, entities: [], queries: [], policies: [], ports: [], reference_targets: [], provenance: nil) @name = name.to_s @hecks_name = @name @description = description @attributes = attributes @value_objects = value_objects @commands = commands @invariants = invariants @preconditions = preconditions @projected_fields = projected_fields @identified_by = identified_by @lifecycle = lifecycle @entities = entities @queries = queries @policies = policies @ports = ports @reference_targets = reference_targets @provenance = provenance settle end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def attributes @attributes end |
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def commands @commands end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def description @description end |
#entities ⇒ Object (readonly)
Returns the value of attribute entities.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def entities @entities end |
#identified_by ⇒ Object (readonly)
Returns the value of attribute identified_by.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def identified_by @identified_by end |
#identity_heads ⇒ Object (readonly)
Returns the value of attribute identity_heads.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def identity_heads @identity_heads end |
#identity_paths ⇒ Object (readonly)
Returns the value of attribute identity_paths.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def identity_paths @identity_paths end |
#invariants ⇒ Object (readonly)
Returns the value of attribute invariants.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def invariants @invariants end |
#lifecycle ⇒ Object (readonly)
Returns the value of attribute lifecycle.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def lifecycle @lifecycle end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def name @name end |
#policies ⇒ Object (readonly)
Returns the value of attribute policies.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def policies @policies end |
#ports ⇒ Object (readonly)
Returns the value of attribute ports.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def ports @ports end |
#preconditions ⇒ Object (readonly)
Returns the value of attribute preconditions.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def preconditions @preconditions end |
#projected_fields ⇒ Object (readonly)
Returns the value of attribute projected_fields.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def projected_fields @projected_fields end |
#provenance ⇒ Object (readonly)
Returns the value of attribute provenance.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def provenance @provenance end |
#queries ⇒ Object (readonly)
Returns the value of attribute queries.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def queries @queries end |
#reference_targets ⇒ Object (readonly)
Returns the value of attribute reference_targets.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def reference_targets @reference_targets end |
#value_objects ⇒ Object (readonly)
Returns the value of attribute value_objects.
75 76 77 |
# File 'lib/hecks/bluebook/aggregate.rb', line 75 def value_objects @value_objects end |