Module: RSS::Maker
Overview
Provides a set of builders for various ::RSS objects
-
Feeds
-
RSS 0.91
-
RSS 1.0
-
RSS 2.0
-
Atom 1.0
-
-
Elements
-
Atom::Entry
-
Constant Summary
-
MAKERS =
Collection of supported makers
{}
Class Method Summary
-
.[](version)
Returns the maker for the
version
-
.add_maker(version, normalized_version, maker)
Adds a maker to the set of supported makers.
-
.make(version, &block)
Builder for an ::RSS object Creates an object of the type passed in
args
-
.makers
Returns collection of supported makers.
-
.supported?(version) ⇒ Boolean
Returns true if the version is supported.
-
.versions
Returns collection of supported maker versions.
-
.maker(version)
private
Can I remove this method?
Class Method Details
.[](version)
Returns the maker for the version
# File 'lib/rss/maker.rb', line 33
def [](version) maker_info = maker(version) raise UnsupportedMakerVersionError.new(version) if maker_info.nil? maker_info[:maker] end
.add_maker(version, normalized_version, maker)
Adds a maker to the set of supported makers
.make(version, &block)
# File 'lib/rss/maker.rb', line 28
def make(version, &block) self[version].make(&block) end
.maker(version) (private)
Can I remove this method?
# File 'lib/rss/maker.rb', line 61
def maker(version) MAKERS[version] end
.makers
Returns collection of supported makers
.supported?(version) ⇒ Boolean
Returns true if the version is supported
# File 'lib/rss/maker.rb', line 55
def supported?(version) versions.include?(version) end
.versions
Returns collection of supported maker versions
# File 'lib/rss/maker.rb', line 45
def versions MAKERS.keys.uniq.sort end