msgthr user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* library usage
@ 2017-12-27 12:22 Dimid Duchovny
  2017-12-27 18:01 ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Dimid Duchovny @ 2017-12-27 12:22 UTC (permalink / raw)
  To: msgthr-public

Hello,

I've tried to use the library with a simple example, 2 messages where
one is a reply to the other:
require 'msgthr'
m1 = {id: 1, subject: 's1'}
m2 = {id: 2, subject: 're: s1'}
msgthr = Msgthr.new
msgthr.add 1, nil, m1
msgthr.add 2, [1], m2
msgthr.thread!
msgthr.walk_thread do |level, container, index|
  msg = container.msg
  subject = msg ? msg[:subject] : "[missing: <#{container.mid}>]"
  indent = '  ' * level
  printf("#{indent} % 3d. %s\n", index, subject)
end

Which fails with:
msgthr.rb:9:in `block in <main>': undefined method `msg' for
#<Array:0x00007ff404841958> (NoMethodError)

Am I missing something?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-31 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27 12:22 library usage Dimid Duchovny
2017-12-27 18:01 ` Eric Wong
2017-12-27 19:06   ` Dimid Duchovny
2017-12-28  1:43     ` Eric Wong
2017-12-31 13:06       ` Dimid Duchovny
2017-12-31 22:22         ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/msgthr.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).