Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Setting reply to -- hook or config?
@ 2008-04-05  5:48 Jeff Balogh
  2008-04-24  5:23 ` [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field Jeff Balogh
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Balogh @ 2008-04-05  5:48 UTC (permalink / raw)


I'm terrible at remembering to reply to all, and today I realized that sup can
help!

I started off making a reply-to hook that takes the array of types sup is
planning to offer in the Reply To field.  I thought the hook would do some fancy
logic and return the right type.  Then I realized I could just list the order of
my reply-to preferences, and pick the first element of the intersection.

  ([:list, :all] & types)[0]

The return value is only used if it's in the types array, so no worries about
nil.

A hook seems like overkill for this one-liner, so maybe it would be more
appropriate for config.yaml?  It makes sense as something in config, but I
hesitate because it would be the first code object (well, the first that _looks_
like code), and because less config variables is good.

-- jeff


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

end of thread, other threads:[~2008-04-24 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-05  5:48 [sup-talk] Setting reply to -- hook or config? Jeff Balogh
2008-04-24  5:23 ` [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field Jeff Balogh
2008-04-24  5:56   ` Marc Hartstein
2008-04-24 14:38     ` Jeff Balogh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox