Hi,

In <BB8675BE-65D9-11D9-876D-000A95DBF456 / fhwang.net>
  "Re: An open question about the RSS stdlib" on Fri, 14 Jan 2005 12:03:37 +0900,
  Francis Hwang <sera / fhwang.net> wrote:
>                                                      I'd like to be 
> able to get the number of items in an RSS while making it. I tried 
> this:
> 
> rss = RSS::Maker.make( '2.0' ) { |maker|
> 	...
> 	while ( maker.items.size < 20 )
> 		...
> 	end
> }
> 
> but that doesn't work.

Does it mean that you want maker.items to have size method?
Then I'll add it.


But, I recommend you to use maker.items.max_size=.

  rss = RSS::Maker.make( '2.0' ) { |maker|
    ...
    ... do
      item = maker.items.new_item
      item.title = ...
      ...
    end
    ...
    maker.items.max_size = 20
  }

If you want to get more example codes, see
test/rss/test_maker*.rb and sample/rss/blend.rb.

--
kou