Class: Edoxen::Decision

Inherits:
Lutaml::Model::Serializable
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#about_topicsArray[String]? (readonly)

Returns the value of attribute about_topics.

Returns:

  • (Array[String], nil)


173
174
175
# File 'sig/edoxen.rbs', line 173

def about_topics
  @about_topics
end

#agenda_itemString? (readonly)

Returns the value of attribute agenda_item.

Returns:

  • (String, nil)


166
167
168
# File 'sig/edoxen.rbs', line 166

def agenda_item
  @agenda_item
end

#brought_by_motionsArray[String]? (readonly)

Returns the value of attribute brought_by_motions.

Returns:

  • (Array[String], nil)


172
173
174
# File 'sig/edoxen.rbs', line 172

def brought_by_motions
  @brought_by_motions
end

#categoriesArray[String]? (readonly)

Returns the value of attribute categories.

Returns:

  • (Array[String], nil)


168
169
170
# File 'sig/edoxen.rbs', line 168

def categories
  @categories
end

#datesArray[DecisionDate]? (readonly)

Returns the value of attribute dates.

Returns:



167
168
169
# File 'sig/edoxen.rbs', line 167

def dates
  @dates
end

#doiString? (readonly)

Returns the value of attribute doi.

Returns:

  • (String, nil)


164
165
166
# File 'sig/edoxen.rbs', line 164

def doi
  @doi
end

#identifierArray[StructuredIdentifier]? (readonly)

Returns the value of attribute identifier.

Returns:



161
162
163
# File 'sig/edoxen.rbs', line 161

def identifier
  @identifier
end

#kindString? (readonly)

Returns the value of attribute kind.

Returns:

  • (String, nil)


162
163
164
# File 'sig/edoxen.rbs', line 162

def kind
  @kind
end

#localizationsArray[Localization]? (readonly)

Returns the value of attribute localizations.

Returns:



175
176
177
# File 'sig/edoxen.rbs', line 175

def localizations
  @localizations
end

#made_in_componentString? (readonly)

Returns the value of attribute made_in_component.

Returns:

  • (String, nil)


174
175
176
# File 'sig/edoxen.rbs', line 174

def made_in_component
  @made_in_component
end

#meetingMeetingIdentifier? (readonly)

Returns the value of attribute meeting.

Returns:



169
170
171
# File 'sig/edoxen.rbs', line 169

def meeting
  @meeting
end

#relationsArray[DecisionRelation]? (readonly)

Returns the value of attribute relations.

Returns:



170
171
172
# File 'sig/edoxen.rbs', line 170

def relations
  @relations
end

#statusString? (readonly)

Returns the value of attribute status.

Returns:

  • (String, nil)


163
164
165
# File 'sig/edoxen.rbs', line 163

def status
  @status
end

#urlsArray[Url]? (readonly)

Returns the value of attribute urls.

Returns:

  • (Array[Url], nil)


171
172
173
# File 'sig/edoxen.rbs', line 171

def urls
  @urls
end

#urnString? (readonly)

Returns the value of attribute urn.

Returns:

  • (String, nil)


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_languageLocalization?

Parameters:

  • code (String, Symbol)
  • fallback: (Boolean)

Returns:



176
# File 'sig/edoxen.rbs', line 176

def in_language: (String|Symbol code, ?fallback: bool) -> Localization?

#primary_localizationLocalization?

Returns:



177
# File 'sig/edoxen.rbs', line 177

def primary_localization: -> Localization?