Module
Constants
Collection of supported makers
Class Methods
::
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 33
def [](version)
maker_info = maker(version)
raise UnsupportedMakerVersionError.new(version) if maker_info.nil?
maker_info[:maker]
end
Returns the maker for the version
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 40
def add_maker(version, normalized_version, maker)
MAKERS[version] = {:maker => maker, :version => normalized_version}
end
Adds a maker to the set of supported makers
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 28
def make(version, &block)
self[version].make(&block)
end
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 61
def maker(version)
MAKERS[version]
end
Can I remove this method?
::
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 50
def makers
MAKERS.values.collect { |info| info[:maker] }.uniq
end
Returns collection of supported makers
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 55
def supported?(version)
versions.include?(version)
end
Returns true if the version is supported
::
lib/rss/maker.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker.rb, line 45
def versions
MAKERS.keys.uniq.sort
end
Returns collection of supported maker versions