[mms2r-users] simplifying adding new carriers

Luke Francl luke at slantwisedesign.com
Sun Nov 18 23:57:26 EST 2007


Hey,

I'm writing instructions on how to add new carrier classes to MMS2R and
while it's not difficult (even I figured out how to do it ;-), it's not as
simple as it could be.

One simple change that I think would make things easier would be if Media
subclasses registered their email gateway mapping with the module's
CARRIER_CLASSES hash.

I think that's just as simple as something like this:

class FoobarMedia < MMS2R::Media
  CARRIER_CLASSES['foobarmms.com'] => FoobarMedia
end

(or maybe a register method on the Media base class could be used to
simplify things further).

The other part is that MMS2R would have to load all the media subclasses
when it's loaded. I think you talked about doing that with directory
globing, right Mike?

Does this sound reasonable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mms2r-users/attachments/20071118/68b37bcc/attachment.html 


More information about the mms2r-users mailing list