Class: Edoxen::MeetingCollection
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Edoxen::MeetingCollection
- Defined in:
- lib/edoxen/meeting_collection.rb,
sig/edoxen.rbs
Overview
Top-level container for many Meetings. Parallel to DecisionCollection.
Instance Attribute Summary collapse
-
#meetings ⇒ Array[Meeting]?
readonly
Returns the value of attribute meetings.
-
#metadata ⇒ MeetingCollectionMetadata?
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#find_by_identifier(prefix:, number:) ⇒ Meeting?
Find a meeting by StructuredIdentifier components.
-
#find_by_urn(urn) ⇒ Meeting?
Find a meeting by URN.
Instance Attribute Details
#meetings ⇒ Array[Meeting]? (readonly)
Returns the value of attribute meetings.
545 546 547 |
# File 'sig/edoxen.rbs', line 545 def meetings @meetings end |
#metadata ⇒ MeetingCollectionMetadata? (readonly)
Returns the value of attribute metadata.
544 545 546 |
# File 'sig/edoxen.rbs', line 544 def @metadata end |
Instance Method Details
#find_by_identifier(prefix:, number:) ⇒ Meeting?
Find a meeting by StructuredIdentifier components. Returns the first meeting whose any identifier matches both prefix and number.
17 18 19 20 21 22 23 |
# File 'lib/edoxen/meeting_collection.rb', line 17 def find_by_identifier(prefix:, number:) meetings&.find do |meeting| meeting.identifier&.any? do |id| id.prefix == prefix.to_s && id.number == number.to_s end end end |
#find_by_urn(urn) ⇒ Meeting?
Find a meeting by URN. Returns nil when no meeting matches.
10 11 12 |
# File 'lib/edoxen/meeting_collection.rb', line 10 def find_by_urn(urn) meetings&.find { |m| m.urn == urn.to_s } end |