123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::ThreadMember

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/net/imap/response_data.rb

Overview

ThreadMember represents a thread-node returned by #thread.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#children (rw)

ThreadMember represents a thread-node returned by Net::IMAP#thread.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 764

class ThreadMember < Struct.new(:seqno, :children)

#seqno (rw)

ThreadMember represents a thread-node returned by Net::IMAP#thread.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 764

class ThreadMember < Struct.new(:seqno, :children)

Instance Method Details

#all_seqnos(node = self) (protected)

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 786

def all_seqnos(node = self)
  [node.seqno].concat node.children.flat_map { _1.all_seqnos }
end

#to_sequence_set

Returns a SequenceSet containing #seqno and all #children’s seqno, recursively.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 780

def to_sequence_set
  SequenceSet.new all_seqnos
end