Using the latest version of the standard web feed library
(RSS::Parser) , that is, 0.2.4, I tried to configure or extend it
so I can read/access non-standard (custom) feed attributes such as the
Google Readers’ original-id. Example:
If anyone has tried something similar or has any tips or tricks on
how to go about I greatly appreciate it.
I’ve got it working.  It looks like the standard RSS::Parser
library cannot handle XML attributes with a dash (such as original-id)
because it generates Ruby attributes using the XML attribute’s name,
thus, leading to invalid Ruby identifiers. Using a .gsub(
‘gr:original-id’, ‘gr:original_id’ ) on the feed data works around it
although ideally I rather prefer not to.
Any comments, fixes or alternative workarounds welcome. Cheers.
class Id < RSS::Element
install_get_attribute( 'original_id', "", false )