Class: Edoxen::Decision
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Edoxen::Decision
- Includes:
- LocalizationHost
- Defined in:
- lib/edoxen/decision.rb,
sig/edoxen.rbs
Overview
A formal Decision — the base type for any outcome adopted by a Meeting.
Was Resolution in v0.x; renamed in v2.0 because the same formal concept
has many names across bodies (resolution, order, ruling, determination,
finding, opinion). Resolution is one kind value, not a class name.
Language-agnostic admin fields live here; every translatable field is
wrapped inside localizations[] (one entry per available language; at
least one is required by the schema).
Instance Attribute Summary collapse
-
#about_topics ⇒ Array[String]?
readonly
Returns the value of attribute about_topics.
-
#agenda_item ⇒ String?
readonly
Returns the value of attribute agenda_item.
-
#brought_by_motions ⇒ Array[String]?
readonly
Returns the value of attribute brought_by_motions.
-
#categories ⇒ Array[String]?
readonly
Returns the value of attribute categories.
-
#dates ⇒ Array[DecisionDate]?
readonly
Returns the value of attribute dates.
-
#doi ⇒ String?
readonly
Returns the value of attribute doi.
-
#identifier ⇒ Array[StructuredIdentifier]?
readonly
Returns the value of attribute identifier.
-
#kind ⇒ String?
readonly
Returns the value of attribute kind.
-
#localizations ⇒ Array[Localization]?
readonly
Returns the value of attribute localizations.
-
#made_in_component ⇒ String?
readonly
Returns the value of attribute made_in_component.
-
#meeting ⇒ MeetingIdentifier?
readonly
Returns the value of attribute meeting.
-
#relations ⇒ Array[DecisionRelation]?
readonly
Returns the value of attribute relations.
-
#status ⇒ String?
readonly
Returns the value of attribute status.
-
#urls ⇒ Array[Url]?
readonly
Returns the value of attribute urls.
-
#urn ⇒ String?
readonly
Returns the value of attribute urn.
Instance Method Summary collapse
-
#brought_by_motions_in(meeting:) ⇒ Object
Returns the Motions in
meetingwhoseresulting_decision(orresulting_decision_ref) points at this Decision's URN. -
#component_in(meeting:) ⇒ Object
Returns the MeetingComponent in
meetingwhose key matchesmade_in_component. - #in_language ⇒ Localization?
- #primary_localization ⇒ Localization?
Instance Attribute Details
#about_topics ⇒ Array[String]? (readonly)
Returns the value of attribute about_topics.
173 174 175 |
# File 'sig/edoxen.rbs', line 173 def about_topics @about_topics end |
#agenda_item ⇒ String? (readonly)
Returns the value of attribute agenda_item.
166 167 168 |
# File 'sig/edoxen.rbs', line 166 def agenda_item @agenda_item end |
#brought_by_motions ⇒ Array[String]? (readonly)
Returns the value of attribute brought_by_motions.
172 173 174 |
# File 'sig/edoxen.rbs', line 172 def brought_by_motions @brought_by_motions end |
#categories ⇒ Array[String]? (readonly)
Returns the value of attribute categories.
168 169 170 |
# File 'sig/edoxen.rbs', line 168 def categories @categories end |
#dates ⇒ Array[DecisionDate]? (readonly)
Returns the value of attribute dates.
167 168 169 |
# File 'sig/edoxen.rbs', line 167 def dates @dates end |
#doi ⇒ String? (readonly)
Returns the value of attribute doi.
164 165 166 |
# File 'sig/edoxen.rbs', line 164 def doi @doi end |
#identifier ⇒ Array[StructuredIdentifier]? (readonly)
Returns the value of attribute identifier.
161 162 163 |
# File 'sig/edoxen.rbs', line 161 def identifier @identifier end |
#kind ⇒ String? (readonly)
Returns the value of attribute kind.
162 163 164 |
# File 'sig/edoxen.rbs', line 162 def kind @kind end |
#localizations ⇒ Array[Localization]? (readonly)
Returns the value of attribute localizations.
175 176 177 |
# File 'sig/edoxen.rbs', line 175 def localizations @localizations end |
#made_in_component ⇒ String? (readonly)
Returns the value of attribute made_in_component.
174 175 176 |
# File 'sig/edoxen.rbs', line 174 def made_in_component @made_in_component end |
#meeting ⇒ MeetingIdentifier? (readonly)
Returns the value of attribute meeting.
169 170 171 |
# File 'sig/edoxen.rbs', line 169 def meeting @meeting end |
#relations ⇒ Array[DecisionRelation]? (readonly)
Returns the value of attribute relations.
170 171 172 |
# File 'sig/edoxen.rbs', line 170 def relations @relations end |
#status ⇒ String? (readonly)
Returns the value of attribute status.
163 164 165 |
# File 'sig/edoxen.rbs', line 163 def status @status end |
#urls ⇒ Array[Url]? (readonly)
Returns the value of attribute urls.
171 172 173 |
# File 'sig/edoxen.rbs', line 171 def urls @urls end |
#urn ⇒ String? (readonly)
Returns the value of attribute urn.
165 166 167 |
# File 'sig/edoxen.rbs', line 165 def urn @urn end |
Instance Method Details
#brought_by_motions_in(meeting:) ⇒ Object
Returns the Motions in meeting whose resulting_decision (or
resulting_decision_ref) points at this Decision's URN.
Storage side: Motion.resultingDecision (SSOT for the relationship).
47 48 49 50 51 52 53 54 |
# File 'lib/edoxen/decision.rb', line 47 def brought_by_motions_in(meeting:) return [] unless meeting && urn meeting.motions.select do |motion| motion.resulting_decision == urn || motion.resulting_decision_ref&.urn == urn end end |
#component_in(meeting:) ⇒ Object
Returns the MeetingComponent in meeting whose key matches
made_in_component.
Storage side: Decision.madeInComponent (SSOT for the relationship).
60 61 62 63 64 65 66 67 |
# File 'lib/edoxen/decision.rb', line 60 def component_in(meeting:) return nil unless meeting && made_in_component meeting.components&.find do |component| component.identifier == made_in_component || component.urn == made_in_component end end |
#in_language ⇒ Localization?
176 |
# File 'sig/edoxen.rbs', line 176
def in_language: (String|Symbol code, ?fallback: bool) -> Localization?
|
#primary_localization ⇒ Localization?
177 |
# File 'sig/edoxen.rbs', line 177
def primary_localization: -> Localization?
|