[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Cannot dump FeedNormalizer Feed objects using YAML

Shajith

6/23/2007 7:07:00 AM

Hi,
I'm downloading and parsing an RSS/Atom feed using open-uri and
feed-normalizer and trying to save the parsed feed as yaml.

Sample code below:

%w(rubygems open-uri feed-normalizer yaml).each {|lib| require lib}
YAML.dump(FeedNormalizer::FeedNormalizer.parse(open("http://waxy.org/links/index...)))

Gives:

TypeError: can't dump anonymous class Class

I read elsewhere on the list about why Class-es cannot be dumped, but
I have no clue why trying to dump a FeedNormalizer::Feed object causes
this error(Don't know where to look).

Has anyone done this sort of thing before? Is there any painless
workaround to this?

Thanks in advance!
Shajith

7 Answers

Andy Smith

6/23/2007 8:09:00 AM

0

>
> Is there any painless workaround to this?
>

Either use Marshal.dump instead, or set parser to nil on the feed object
before YAMLification:

feed = FeedNormalizer.parse(open("http://waxy.org/links/index...))
feed.parser = nil # [1]
YAML.dump(feed) # now it should work...

# [1] or maybe feed.parser = feed.parser.to_s if you don't
# want to lose meta info.


I intend to fix this in the next release so that pre-serialization
object tampering isn't required :)

Hope that helps.

Andy

Shajith

6/23/2007 8:19:00 AM

0

On 6/23/07, Andy Smith <andy@tinnedfruit.org> wrote:
>
> Either use Marshal.dump instead, or set parser to nil on the feed object
> before YAMLification:

Ah, so that's what I need to zero out. I need to use YAML because I
want to keep the data human-inspectable.

Much thanks, and looking forward to the next release.

Shajith

DM

1/19/2010 11:23:00 PM

0

On Jan 20, 9:18 am, cornholio <andxor...@gmail.com> wrote:
> On Jan 19, 2:44 pm, DM <d-m...@adfa.edu.au> wrote:
>
>
>
>
>
> > On Jan 19, 5:42 pm, " Dr. Sir John Howard, AC, WSCMoF " <""noujwas
> > \"@yahoo.com is a stupid muzzie
> > troll                                                                                                                                                                                                                                                                                                                            .">
> > wrote:
>
> > >http://www.smh.com.au/national/copts-march-through-sydney-t.......
>
> > > More than 300 members of Australia's Coptic Christian community have marched
> > > through Sydney to protest at the deaths of six Copts in Egypt this month.
>
> > I'm surprised you didn't use your usual headline about "arselifters".
>
> >http://www.lacopts.org/articles/prostrations-according-to-t......
>
> > ...
> > On the topic of prostration in prayer, Mar Isaac said the following:
>
> > + “Do not think that prostrating yourself before God is a light
> > matter. None of all the good deeds equals persevering in completing
> > prayers with prostrations.”
>
> > + “Compel yourself to kneel down before God, for this invigorates the
> > spirit of prayer.”
>
> > + “Persistence in offering bows every now and then, will give the
> > vigilant worshipper the ideal atmosphere for worshipping.”
>
> > + “A love for continual prostration before God during prayer is an
> > indication that the soul has died to the world and has realised the
> > mystery of the new life.”
>
> > The Church does not allow prostration on Saturdays and Sundays or
> > during the fifty days of Pentecost or after having Holy Communion.
> > ...
>
> > DM
>
> What does the above have to do w/the persecution of Coptic Christians
> (or
> "Christains", as Seonie describes them) in Islamonazi Egypt?
>
> Drum roll...
>
> That's right, nothing whatsoever.

I can't see what these arselifters marching to protest the killing of
Copts in Egypt has to do with aus.politics, alt.religion.islam or
soc.culture.israel either. Will you be pointing this out to the
original poster?

DM

cornholio

1/20/2010 4:03:00 AM

0

On Jan 19, 3:23 pm, DM <d-m...@adfa.edu.au> wrote:
> On Jan 20, 9:18 am, cornholio <andxor...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Jan 19, 2:44 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > On Jan 19, 5:42 pm, " Dr. Sir John Howard, AC, WSCMoF " <""noujwas
> > > \"@yahoo.com is a stupid muzzie
> > > troll                                                                                                                                                                                                                                                                                                                            .">
> > > wrote:
>
> > > >http://www.smh.com.au/national/copts-march-through-sydney-t......
>
> > > > More than 300 members of Australia's Coptic Christian community have marched
> > > > through Sydney to protest at the deaths of six Copts in Egypt this month.
>
> > > I'm surprised you didn't use your usual headline about "arselifters".
>
> > >http://www.lacopts.org/articles/prostrations-according-to-t.......
>
> > > ...
> > > On the topic of prostration in prayer, Mar Isaac said the following:
>
> > > + “Do not think that prostrating yourself before God is a light
> > > matter. None of all the good deeds equals persevering in completing
> > > prayers with prostrations.”
>
> > > + “Compel yourself to kneel down before God, for this invigorates the
> > > spirit of prayer.”
>
> > > + “Persistence in offering bows every now and then, will give the
> > > vigilant worshipper the ideal atmosphere for worshipping.”
>
> > > + “A love for continual prostration before God during prayer is an
> > > indication that the soul has died to the world and has realised the
> > > mystery of the new life.”
>
> > > The Church does not allow prostration on Saturdays and Sundays or
> > > during the fifty days of Pentecost or after having Holy Communion.
> > > ...
>
> > > DM
>
> > What does the above have to do w/the persecution of Coptic Christians
> > (or
> > "Christains", as Seonie describes them) in Islamonazi Egypt?
>
> > Drum roll...
>
> > That's right, nothing whatsoever.
>
> I can't see what these arselifters marching to protest the killing of
> Copts in Egypt has to do with aus.politics, alt.religion.islam or
> soc.culture.israel either. Will you be pointing this out to the
> original poster?
>
> DM

It's new story, maybe you've heard of them.

DM

1/20/2010 8:21:00 AM

0

On Jan 20, 2:02 pm, cornholio <andxor...@gmail.com> wrote:
> On Jan 19, 3:23 pm, DM <d-m...@adfa.edu.au> wrote:
>
>
>
> > On Jan 20, 9:18 am, cornholio <andxor...@gmail.com> wrote:
>
> > > On Jan 19, 2:44 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > > On Jan 19, 5:42 pm, " Dr. Sir John Howard, AC, WSCMoF " <""noujwas
> > > > \"@yahoo.com is a stupid muzzie
> > > > troll                                                                                                                                                                                                                                                                                                                            .">
> > > > wrote:
>
> > > > >http://www.smh.com.au/national/copts-march-through-sydney-t......
>
> > > > > More than 300 members of Australia's Coptic Christian community have marched
> > > > > through Sydney to protest at the deaths of six Copts in Egypt this month.
>
> > > > I'm surprised you didn't use your usual headline about "arselifters".
>
> > > >http://www.lacopts.org/articles/prostrations-according-to-t......
>
> > > > ...
> > > > On the topic of prostration in prayer, Mar Isaac said the following:
>
> > > > + “Do not think that prostrating yourself before God is a light
> > > > matter. None of all the good deeds equals persevering in completing
> > > > prayers with prostrations.”
>
> > > > + “Compel yourself to kneel down before God, for this invigorates the
> > > > spirit of prayer.”
>
> > > > + “Persistence in offering bows every now and then, will give the
> > > > vigilant worshipper the ideal atmosphere for worshipping.”
>
> > > > + “A love for continual prostration before God during prayer is an
> > > > indication that the soul has died to the world and has realised the
> > > > mystery of the new life.”
>
> > > > The Church does not allow prostration on Saturdays and Sundays or
> > > > during the fifty days of Pentecost or after having Holy Communion.
> > > > ...
>
> > > > DM
>
> > > What does the above have to do w/the persecution of Coptic Christians
> > > (or
> > > "Christains", as Seonie describes them) in Islamonazi Egypt?
>
> > > Drum roll...
>
> > > That's right, nothing whatsoever.
>
> > I can't see what these arselifters marching to protest the killing of
> > Copts in Egypt has to do with aus.politics, alt.religion.islam or
> > soc.culture.israel either. Will you be pointing this out to the
> > original poster?
>
> > DM
>
> It's new story, maybe you've heard of them.

Thousands of new things happen every hour. Not all of them are
relevant to the newsgroups aus.politics, alt.religion.islam or
soc.culture.israel. Of course you neo-Nazis think everything that
registers in your buzzing and clicking little minds is relevant to
everyone. Thats just part of the megalomania.

BTW most people think Copts is a reality TV show from the USA.
http://www...

DM

cornholio

1/20/2010 9:08:00 AM

0

On Jan 20, 12:20 am, DM <d-m...@adfa.edu.au> wrote:
> On Jan 20, 2:02 pm, cornholio <andxor...@gmail.com> wrote:
>
>
>
> > On Jan 19, 3:23 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > On Jan 20, 9:18 am, cornholio <andxor...@gmail.com> wrote:
>
> > > > On Jan 19, 2:44 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > > > On Jan 19, 5:42 pm, " Dr. Sir John Howard, AC, WSCMoF " <""noujwas
> > > > > \"@yahoo.com is a stupid muzzie
> > > > > troll                                                                                                                                                                                                                                                                                                                            .">
> > > > > wrote:
>
> > > > > >http://www.smh.com.au/national/copts-march-through-sydney-t......
>
> > > > > > More than 300 members of Australia's Coptic Christian community have marched
> > > > > > through Sydney to protest at the deaths of six Copts in Egypt this month.
>
> > > > > I'm surprised you didn't use your usual headline about "arselifters".
>
> > > > >http://www.lacopts.org/articles/prostrations-according-to-t......
>
> > > > > ...
> > > > > On the topic of prostration in prayer, Mar Isaac said the following:
>
> > > > > + “Do not think that prostrating yourself before God is a light
> > > > > matter. None of all the good deeds equals persevering in completing
> > > > > prayers with prostrations.”
>
> > > > > + “Compel yourself to kneel down before God, for this invigorates the
> > > > > spirit of prayer.”
>
> > > > > + “Persistence in offering bows every now and then, will give the
> > > > > vigilant worshipper the ideal atmosphere for worshipping.”
>
> > > > > + “A love for continual prostration before God during prayer is an
> > > > > indication that the soul has died to the world and has realised the
> > > > > mystery of the new life.”
>
> > > > > The Church does not allow prostration on Saturdays and Sundays or
> > > > > during the fifty days of Pentecost or after having Holy Communion.
> > > > > ...
>
> > > > > DM
>
> > > > What does the above have to do w/the persecution of Coptic Christians
> > > > (or
> > > > "Christains", as Seonie describes them) in Islamonazi Egypt?
>
> > > > Drum roll...
>
> > > > That's right, nothing whatsoever.
>
> > > I can't see what these arselifters marching to protest the killing of
> > > Copts in Egypt has to do with aus.politics, alt.religion.islam or
> > > soc.culture.israel either. Will you be pointing this out to the
> > > original poster?
>
> > > DM
>
> > It's new story, maybe you've heard of them.
>
> Thousands of new things happen every hour. Not all of them are
> relevant to the newsgroups aus.politics, alt.religion.islam or
> soc.culture.israel. Of course you neo-Nazis think everything that
> registers in your buzzing and clicking little minds is relevant to
> everyone. Thats just part of the megalomania.
>
> BTW most people think Copts is a reality TV show from the USA.http://www...
>
> DM

Yes, I'm sure you and your islamonazi brethren would certainly LIKE
to decide what kind of news gets reported and where. It's just
unfortunate
like concepts like freedom of speech and freedom of the press keep
getting
in your way. SOB.

DM

1/20/2010 9:35:00 AM

0

On Jan 20, 7:08 pm, cornholio <andxor...@gmail.com> wrote:
> On Jan 20, 12:20 am, DM <d-m...@adfa.edu.au> wrote:
>
>
>
> > On Jan 20, 2:02 pm, cornholio <andxor...@gmail.com> wrote:
>
> > > On Jan 19, 3:23 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > > On Jan 20, 9:18 am, cornholio <andxor...@gmail.com> wrote:
>
> > > > > On Jan 19, 2:44 pm, DM <d-m...@adfa.edu.au> wrote:
>
> > > > > > On Jan 19, 5:42 pm, " Dr. Sir John Howard, AC, WSCMoF " <""noujwas
> > > > > > \"@yahoo.com is a stupid muzzie
> > > > > > troll                                                                                                                                                                                                                                                                                                                            .">
> > > > > > wrote:
>
> > > > > > >http://www.smh.com.au/national/copts-march-through-sydney-t......
>
> > > > > > > More than 300 members of Australia's Coptic Christian community have marched
> > > > > > > through Sydney to protest at the deaths of six Copts in Egypt this month.
>
> > > > > > I'm surprised you didn't use your usual headline about "arselifters".
>
> > > > > >http://www.lacopts.org/articles/prostrations-according-to-t......
>
> > > > > > ...
> > > > > > On the topic of prostration in prayer, Mar Isaac said the following:
>
> > > > > > + “Do not think that prostrating yourself before God is a light
> > > > > > matter. None of all the good deeds equals persevering in completing
> > > > > > prayers with prostrations.”
>
> > > > > > + “Compel yourself to kneel down before God, for this invigorates the
> > > > > > spirit of prayer.”
>
> > > > > > + “Persistence in offering bows every now and then, will give the
> > > > > > vigilant worshipper the ideal atmosphere for worshipping.”
>
> > > > > > + “A love for continual prostration before God during prayer is an
> > > > > > indication that the soul has died to the world and has realised the
> > > > > > mystery of the new life.”
>
> > > > > > The Church does not allow prostration on Saturdays and Sundays or
> > > > > > during the fifty days of Pentecost or after having Holy Communion.
> > > > > > ...
>
> > > > > > DM
>
> > > > > What does the above have to do w/the persecution of Coptic Christians
> > > > > (or
> > > > > "Christains", as Seonie describes them) in Islamonazi Egypt?
>
> > > > > Drum roll...
>
> > > > > That's right, nothing whatsoever.
>
> > > > I can't see what these arselifters marching to protest the killing of
> > > > Copts in Egypt has to do with aus.politics, alt.religion.islam or
> > > > soc.culture.israel either. Will you be pointing this out to the
> > > > original poster?
>
> > > > DM
>
> > > It's new story, maybe you've heard of them.
>
> > Thousands of new things happen every hour. Not all of them are
> > relevant to the newsgroups aus.politics, alt.religion.islam or
> > soc.culture.israel. Of course you neo-Nazis think everything that
> > registers in your buzzing and clicking little minds is relevant to
> > everyone. Thats just part of the megalomania.
>
> > BTW most people think Copts is a reality TV show from the USA.http://www...
>
> > DM
>
> Yes, I'm sure you and your islamonazi brethren would certainly LIKE
> to decide what kind of news gets reported and where. It's just
> unfortunate
> like concepts like freedom of speech and freedom of the press keep
> getting
> in your way. SOB.


You pper to be confusing your religions again. We don't have an
IslamoNazi Brethren here, we do have the Exclusive Brethren though.

http://www.theexclusivebre...

I'm pretty sure they gave me a heap of brand new sleeping backs for
some refugees I looked after about 10 years ago. Most of the refugees
were Muslims too.

DM