Class: Edoxen::Topic
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Edoxen::Topic
- Defined in:
- lib/edoxen/topic.rb,
sig/edoxen.rbs
Overview
Topic — the subject of discussion at a Meeting. A Topic can have documents (text), assets (non-text), references (external pointers), and is the anchor for Motions and Decisions.
Cross-meeting threading via resumption_of (URN to a prior Topic
in a prior Meeting) — pattern from HK LegCo OData schema.
Instance Attribute Summary collapse
-
#assets ⇒ Array[TopicAsset]?
readonly
Returns the value of attribute assets.
-
#decisions ⇒ Array[String]?
readonly
Returns the value of attribute decisions.
-
#description ⇒ String?
readonly
Returns the value of attribute description.
-
#documents ⇒ Array[TopicDocument]?
readonly
Returns the value of attribute documents.
-
#identifier ⇒ String?
readonly
Returns the value of attribute identifier.
-
#motions ⇒ Array[String]?
readonly
Returns the value of attribute motions.
-
#references ⇒ Array[Reference]?
readonly
Returns the value of attribute references.
-
#resumption_of ⇒ String?
readonly
Returns the value of attribute resumption_of.
-
#status ⇒ String?
readonly
Returns the value of attribute status.
-
#title ⇒ String?
readonly
Returns the value of attribute title.
-
#urn ⇒ String?
readonly
Returns the value of attribute urn.
Instance Method Summary collapse
-
#decisions_in(collection:) ⇒ Object
--- v2.1 derivation accessor (TODO.refactor/45) -------------------- Returns the Decisions in
collectionwhoseabout_topicsincludes this Topic's URN.
Instance Attribute Details
#assets ⇒ Array[TopicAsset]? (readonly)
Returns the value of attribute assets.
281 282 283 |
# File 'sig/edoxen.rbs', line 281 def assets @assets end |
#decisions ⇒ Array[String]? (readonly)
Returns the value of attribute decisions.
284 285 286 |
# File 'sig/edoxen.rbs', line 284 def decisions @decisions end |
#description ⇒ String? (readonly)
Returns the value of attribute description.
277 278 279 |
# File 'sig/edoxen.rbs', line 277 def description @description end |
#documents ⇒ Array[TopicDocument]? (readonly)
Returns the value of attribute documents.
280 281 282 |
# File 'sig/edoxen.rbs', line 280 def documents @documents end |
#identifier ⇒ String? (readonly)
Returns the value of attribute identifier.
274 275 276 |
# File 'sig/edoxen.rbs', line 274 def identifier @identifier end |
#motions ⇒ Array[String]? (readonly)
Returns the value of attribute motions.
283 284 285 |
# File 'sig/edoxen.rbs', line 283 def motions @motions end |
#references ⇒ Array[Reference]? (readonly)
Returns the value of attribute references.
282 283 284 |
# File 'sig/edoxen.rbs', line 282 def references @references end |
#resumption_of ⇒ String? (readonly)
Returns the value of attribute resumption_of.
279 280 281 |
# File 'sig/edoxen.rbs', line 279 def resumption_of @resumption_of end |
#status ⇒ String? (readonly)
Returns the value of attribute status.
278 279 280 |
# File 'sig/edoxen.rbs', line 278 def status @status end |
#title ⇒ String? (readonly)
Returns the value of attribute title.
276 277 278 |
# File 'sig/edoxen.rbs', line 276 def title @title end |
#urn ⇒ String? (readonly)
Returns the value of attribute urn.
275 276 277 |
# File 'sig/edoxen.rbs', line 275 def urn @urn end |
Instance Method Details
#decisions_in(collection:) ⇒ Object
--- v2.1 derivation accessor (TODO.refactor/45) --------------------
Returns the Decisions in collection whose about_topics includes
this Topic's URN.
Storage side: Decision.aboutTopics (SSOT for the relationship).
The stored decisions[] field remains on the wire for back-compat
through v2.x; v3.0 removes it and this becomes the only path.
31 32 33 34 35 |
# File 'lib/edoxen/topic.rb', line 31 def decisions_in(collection:) return [] unless collection && urn collection.decisions.select { |decision| decision.about_topics&.include?(urn) } end |