class Msgthr::Container
An internal container class, this is exposed for Msgthr#thread!
Msgthr#order!
and Msgthr#walk_thread
APIs through block parameters. They should should not be initialized in your own code.
One container object will exist for every message you call Msgthr#add! on, so there can potentially be many of these objects for large sets of messages.
Attributes
You probably do not need to use this. It is only safe to access this after Msgthr#order!
This contains an Array of Msgthr::Container
objects which have the parent
field pointing to us
Unique message identifier, typically the Message-Id header for mail and news messages. This may be any hashable object, Integer values are allowed and will not be coerced to string values.
Opaque data pointer, may be used by the user for any purpose. This is nil
to denote missing (aka “ghost”) messages.
Public Instance Methods
Returns the topmost message container with an opaque message pointer in it. This may be nil
if no message is available. This is preferable to using the container yielded by Msgthr#order!
directly when handling incomplete message sets.
# File lib/msgthr/container.rb, line 46 def topmost q = [ self ] while cont = q.shift return cont if cont.msg q.concat(cont.children.values) end nil end