12 Jul 2005 06:14
Re: Documenting methods for which there is no source
mathew <meta <at> pobox.com>
2005-07-12 04:14:54 GMT
2005-07-12 04:14:54 GMT
Sam Roberts wrote: >The most annoying thing I find with the RSS encoder is failures seem to >return nil. No exception, no error message, you call a method, get nil >back, and then have to start reading the code, and thats not so easy >because many of the methods don't actually exist in text form, they are >created on the fly. > > Well, I have to say that having spent some hours working my way through it, I don't like the RSS library as a decoder of RSS. It seems to be a literal translation of the standards into code, rather than something designed to be easy and convenient to use. As a result, you need to know what kind of RSS feed you're parsing, because the API for accessing the parsed objects is different depending on the input format--your code may work fine for RSS2.0, and then fall over with a nil when fed RSS1.0 by the next feed. I had a look on the web for other Ruby RSS implementations, and based on what I found I'm assuming this one got chosen for the standard library because it was the first one to implement at least three major flavors of RSS, i.e. the first to be fairly complete. I was kinda hoping it was better as an encoder. I try to avoid wheel-reinvention, but this particular wheel is just begging for it... mathew
RSS Feed