In Files

  • rss/maker.rb
  • rss/maker/0.9.rb
  • rss/maker/1.0.rb
  • rss/maker/2.0.rb
  • rss/maker/atom.rb
  • rss/maker/base.rb
  • rss/maker/content.rb
  • rss/maker/dublincore.rb
  • rss/maker/entry.rb
  • rss/maker/feed.rb
  • rss/maker/image.rb
  • rss/maker/itunes.rb
  • rss/maker/slash.rb
  • rss/maker/syndication.rb
  • rss/maker/taxonomy.rb
  • rss/maker/trackback.rb

Class/Module Index [+]

Quicksearch

RSS::Maker

Provides a set of builders for various RSS objects

Constants

MAKERS

Collection of supported makers

Public Instance Methods

[](version) click to toggle source

Returns the maker for the version

 
               # File rss/maker.rb, line 32
def [](version)
  maker_info = maker(version)
  raise UnsupportedMakerVersionError.new(version) if maker_info.nil?
  maker_info[:maker]
end
            
add_maker(version, normalized_version, maker) click to toggle source

Adds a maker to the set of supported makers

 
               # File rss/maker.rb, line 39
def add_maker(version, normalized_version, maker)
  MAKERS[version] = {:maker => maker, :version => normalized_version}
end
            
make(version, &block) click to toggle source

Builder for an RSS object Creates an object of the type passed in args

Executes the block to populate elements of the created RSS object

 
               # File rss/maker.rb, line 27
def make(version, &block)
  self[version].make(&block)
end
            
makers() click to toggle source

Returns collection of supported makers

 
               # File rss/maker.rb, line 49
def makers
  MAKERS.values.collect { |info| info[:maker] }.uniq
end
            
supported?(version) click to toggle source

Returns true if the version is supported

 
               # File rss/maker.rb, line 54
def supported?(version)
  versions.include?(version)
end
            
versions() click to toggle source

Returns collection of supported maker versions

 
               # File rss/maker.rb, line 44
def versions
  MAKERS.keys.uniq.sort
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