Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add `Enumerable` behavior to `Feedzirra::Parser::RSSEntry` #65

merged 2 commits into from Sep 30, 2011


None yet
2 participants

semperos commented Sep 22, 2011

I've included the Enumerable module and added basic each, [] and []= methods for the Feedzirra::Parser::RSSEntry class.

If there is some default, intuitive way to sort RSSEntry objects, let me know what you'd like to sort by, and I can implement a <=> method as well to allow for use of the sort method.


semperos commented Sep 23, 2011

In actuality, the include Enumerable and the new methods I defined should be extracted to a separate module, and then included for RSSEntry, AtomFeedBurnerEntry and AtomEntry (if that covers all the entry-type classes).

Just ran into this while using it, since Feedzirra dynamically chooses which parsing method to use, all need to have equivalent support.

Probably easier if you just accept this pull request and do that extraction, as I'm not sure where you'd want that separate module to live or what you'd like to call it.


archiloque commented Sep 24, 2011

Could you add some tests for it ?


semperos commented Sep 25, 2011

Did you have other tests in mind, besides the ones in my first commit? I made sure tests were the first thing I committed and that all specs passed before I made my pull request. Let me know if more is needed.

archiloque added a commit that referenced this pull request Sep 30, 2011

Merge pull request #65 from semperos/rss-entry-enum
Add `Enumerable` behavior to `Feedzirra::Parser::RSSEntry`

@archiloque archiloque merged commit 1bcafd5 into feedjira:master Sep 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment