Class: Edoxen::MeetingCollection

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/edoxen/meeting_collection.rb,
sig/edoxen.rbs

Overview

Top-level container for many Meetings. Parallel to DecisionCollection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#meetingsArray[Meeting]? (readonly)

Returns the value of attribute meetings.

Returns:



545
546
547
# File 'sig/edoxen.rbs', line 545

def meetings
  @meetings
end

#metadataMeetingCollectionMetadata? (readonly)

Returns the value of attribute metadata.

Returns:



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.

Parameters:

  • prefix: (String, Symbol)
  • number: (String, Symbol)

Returns:



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.

Parameters:

  • urn (String)

Returns:



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