Skip to content

Instantly share code, notes, and snippets.

@darrencauthon
Forked from calebcauthon/gist:3034473
Created July 2, 2012 17:36
Show Gist options
  • Select an option

  • Save darrencauthon/3034487 to your computer and use it in GitHub Desktop.

Select an option

Save darrencauthon/3034487 to your computer and use it in GitHub Desktop.
params = {}
params[:to] = "white@lists.lawrenceultimate.com"
params[:subject] = "xxx"
params[:from] = ""
@@params = params
# need to add gem smoke_monster for this
items = [:to, :team, :from_email].to_objects {
[:blue, :red, :white, :black, :orange, :green, :yellow, :pink, :test].map do |color|
["#{color.to_s}@", "#{color.to_s.upcase}", "#{color.to_s.capitalize} Team <#{color.to_s}@lawrenceultimate.com>"]
end
}
item = items.select { |i| @@params[:to].include?(i.to) }[0]
to_email = get_emails_for_team(item.team)
from_email = item.from_email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment