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
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to