Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Documenting methods for which there is no source: msg#00006

Subject: Re: Documenting methods for which there is no source
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




<Prev in Thread] Current Thread [Next in Thread>