123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::ESearchResult::PartialResult

Relationships & Source Files
Inherits: Object
Defined in: lib/net/imap/esearch_result.rb

Overview

Returned by #partial.

Requires PARTIAL [RFC9394] or CONTEXT=SEARCH/CONTEXT=SORT [RFC5267]

See also: #to_a

Class Method Summary

Instance Method Summary

  • #to_a

    Converts #results to an array of integers.

Constructor Details

.new(range:, results:) ⇒ PartialResult

[ GitHub ]

  
# File 'lib/net/imap/esearch_result.rb', line 146

def initialize(range:, results:)
  range   => Range
  results = SequenceSet[results] unless results.nil?
  super
end

Instance Method Details

#to_a

Converts #results to an array of integers.

See also: Net::IMAP::ESearchResult#to_a.

[ GitHub ]

  
# File 'lib/net/imap/esearch_result.rb', line 163

def to_a; results&.numbers || [] end