In Files

  • rss/maker/base.rb
  • rss/maker/content.rb
  • rss/maker/dublincore.rb
  • rss/maker/image.rb
  • rss/maker/taxonomy.rb
  • rss/maker/trackback.rb

Parent

Included Modules

Class/Module Index [+]

Quicksearch

RSS::Maker::ItemsBase

Attributes

do_sort[RW]
max_size[RW]

Public Class Methods

new(maker) click to toggle source
 
               # File rss/maker/base.rb, line 413
def initialize(maker)
  super
  @do_sort = false
  @max_size = -1
end
            

Public Instance Methods

current_element(rss) click to toggle source
 
               # File rss/maker/base.rb, line 427
def current_element(rss)
  rss.items
end
            
new_item() click to toggle source
 
               # File rss/maker/base.rb, line 431
def new_item
  item = self.class::Item.new(@maker)
  @items << item
  if block_given?
    yield item
  else
    item
  end
end
            
normalize() click to toggle source
 
               # File rss/maker/base.rb, line 419
def normalize
  if @max_size >= 0
    sort_if_need[0...@max_size]
  else
    sort_if_need[0..@max_size]
  end
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus