Closed srbiv closed 13 years ago
Seems like you can solve this easier like this:
class Uakari
# whatever was here before...
def self.api_key(key)
@@default_instance = new(key)
end
def self.send_email(*args)
@@default_instance.send_email(*args)
end
end
maybe add some check that an api_key is set before calling send_email
I'm going to take Calvin's suggestion so one can create an instance if needed plus some of the stuff you did, Stafford, so Uakari config is DRY. I'll try to make time tonight.
Cool, sounds good to me. Thanks!
Thank you. Sorry for the mixup -- I didn't really understand what Federico was after until just recently.
No worries, I learned a ton doing this anyway :)
So did I (namely how to impl an ActionMailer handler O_O).
Just pushed 0.2.3 -- should be good to go. I'll do something similar w/ gibbon as soon as I can. Note that for config, I changed "apikey" to "api_key".
Hopefully this one will work better.