Method: Ephem::IO::SummaryManager#each_summary

Defined in:
lib/ephem/io/summary_manager.rb

#each_summary {|name, values| ... } ⇒ Enumerator?

Iterates through each summary in the DAF file

This method traverses the chain of summary records, extracting both the summary data and associated names. It handles proper binary unpacking based on the file’s endianness and the record format specification.

If no block is given, returns an Enumerator for the summaries.

Yields:

  • (name, values)

    Yields each summary’s name and values

Yield Parameters:

  • name (String)

    The name associated with the summary

  • values (Array<Float, Integer>)

    Array containing the summary values, with doubles followed by integers according to the record format

Returns:

  • (Enumerator)

    If no block given, returns an Enumerator that will iterate over all summaries

  • (nil)

    If block given, returns nil after iteration completes



80
81
82
83
84
85
86
# File 'lib/ephem/io/summary_manager.rb', line 80

def each_summary
  return to_enum(__method__) unless block_given?

  iterate_summary_chain(@record_data.forward_record) do |name, values|
    yield name, values
  end
end