Class: Hecks::Bluebook::Chapter
- Inherits:
-
Object
- Object
- Hecks::Bluebook::Chapter
- Includes:
- Behaviour::Chapter, Construct, IR
- Defined in:
- lib/hecks/bluebook/chapter.rb
Overview
THE CHAPTER, and no longer the namespace it lives in.
Hecks::Bluebook was briefly a CLASS, because dropping the
old IR:: segment would otherwise have produced
Bluebook::Bluebook — a class shadowing its own enclosing module.
Naming the construct what the code already called it everywhere
(a chapter; this file was already chapter.rb) removes the clash
at the source, so the namespace goes back to being a module.
Measured before changing: Bluebook was used AS a class in five
places and as a namespace in seventy-seven files.
Constant Summary collapse
- IR_VERSION =
THE SCHEMA'S OWN VERSION — not a domain's
version:(Banking's "v1", a business fact the AUTHOR chose), but the shapeto_hitself emits. A consumer reading exported IR with no Ruby DSL to cross-check against (a build-time generator, a stored snapshot) needs to know WHICH shape it's holding before it can safely interpret any of the rest of it. Bump this whento_h's own shape changes in a way a consumer would need to know about — not when a domain's own declarations change. 1
Instance Attribute Summary collapse
-
#aggregates ⇒ Object
readonly
Returns the value of attribute aggregates.
-
#attaches_to ⇒ Object
readonly
Returns the value of attribute attaches_to.
-
#classification ⇒ Object
readonly
Returns the value of attribute classification.
-
#formerly_known_as ⇒ Object
readonly
Returns the value of attribute formerly_known_as.
-
#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.
-
#process_managers ⇒ Object
readonly
Returns the value of attribute process_managers.
-
#read_models ⇒ Object
readonly
Returns the value of attribute read_models.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#vision ⇒ Object
readonly
Returns the value of attribute vision.
Attributes included from Construct
#hecks_name, #hecks_owner, #hecks_root
Instance Method Summary collapse
-
#initialize(name:, version: nil, vision: nil, aggregates: [], policies: [], process_managers: [], classification: nil, read_models: [], formerly_known_as: nil, attaches_to: []) ⇒ Chapter
constructor
A new instance of Chapter.
Methods included from IR
Methods included from Behaviour::Chapter
#add_port, #aggregate, #port, #read_model, #settle, #verbs
Methods included from Behaviour::Owns
Methods included from Construct
#hecks_fqn, #hecks_root?, #hecks_separator
Constructor Details
#initialize(name:, version: nil, vision: nil, aggregates: [], policies: [], process_managers: [], classification: nil, read_models: [], formerly_known_as: nil, attaches_to: []) ⇒ Chapter
Returns a new instance of Chapter.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/hecks/bluebook/chapter.rb', line 59 def initialize(name:, version: nil, vision: nil, aggregates: [], policies: [], process_managers: [], classification: nil, read_models: [], formerly_known_as: nil, attaches_to: []) @policies = policies @process_managers = process_managers @name = name.to_s @hecks_name = @name @hecks_root = true @version = version&.to_s @vision = vision @aggregates = aggregates @read_models = read_models @classification = classification&.to_s @formerly_known_as = formerly_known_as&.to_s @attaches_to = Array(attaches_to).map(&:to_s) settle end |
Instance Attribute Details
#aggregates ⇒ Object (readonly)
Returns the value of attribute aggregates.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def aggregates @aggregates end |
#attaches_to ⇒ Object (readonly)
Returns the value of attribute attaches_to.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def attaches_to @attaches_to end |
#classification ⇒ Object (readonly)
Returns the value of attribute classification.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def classification @classification end |
#formerly_known_as ⇒ Object (readonly)
Returns the value of attribute formerly_known_as.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def formerly_known_as @formerly_known_as end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def name @name end |
#policies ⇒ Object (readonly)
Returns the value of attribute policies.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def policies @policies end |
#ports ⇒ Object (readonly)
Returns the value of attribute ports.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def ports @ports end |
#process_managers ⇒ Object (readonly)
Returns the value of attribute process_managers.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def process_managers @process_managers end |
#read_models ⇒ Object (readonly)
Returns the value of attribute read_models.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def read_models @read_models end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def version @version end |
#vision ⇒ Object (readonly)
Returns the value of attribute vision.
56 57 58 |
# File 'lib/hecks/bluebook/chapter.rb', line 56 def vision @vision end |