Project

General

Profile

Bug #8889 ยป 0001-Nodoc-large-parts-of-rss.patch

steveklabnik (Steve Klabnik), 09/11/2013 05:18 AM

View differences:

lib/rss/0.9.rb
# RSS 0.9 feed with one item. If we needed a second item, we'd make another
# block with maker.items.new_item and build a second one.
module RSS09
NSPOOL = {}
ELEMENTS = []
NSPOOL = {} # :nodoc:
ELEMENTS = [] # :nodoc:
def self.append_features(klass)
def self.append_features(klass) # :nodoc:
super
klass.install_must_call_validator('', "")
end
end
class Rss < Element
class Rss < Element # :nodoc: all
include RSS09
include RootElementMixin
......
end
class SkipHours < Element
class SkipHours < Element # :nodoc: all
include RSS09
[
lib/rss/1.0.rb
# RSS 1.0 feed with one item. If we needed a second item, we'd make another
# block with maker.items.new_item and build a second one.
module RSS10
NSPOOL = {}
ELEMENTS = []
NSPOOL = {} # :nodoc:
ELEMENTS = [] # :nodoc:
def self.append_features(klass)
def self.append_features(klass) # :nodoc:
super
klass.install_must_call_validator('', ::RSS::URI)
......
end
class RDF < Element
class RDF < Element # :nodoc: all
include RSS10
include RootElementMixin
......
BaseListener.install_get_text_element(URI, name, name)
end
module ListenerMixin
module ListenerMixin # :nodoc: all
private
def initial_start_RDF(tag_name, prefix, attrs, ns)
check_ns(tag_name, prefix, ns, RDF::URI, false)
lib/rss/2.0.rb
# block with maker.items.new_item and build a second one.
class Rss
class Channel
class Channel # :nodoc: all
[
["generator"],
lib/rss/atom.rb
# See the RSS module for examples consuming and creating feeds.
module Atom
##
# The Atom URI W3C Namespace
URI = "http://www.w3.org/2005/Atom" # :nodoc:
URI = "http://www.w3.org/2005/Atom"
XHTML_URI = "http://www.w3.org/1999/xhtml" # :nodoc:
##
# The XHTML URI W3C Namespace
XHTML_URI = "http://www.w3.org/1999/xhtml"
module CommonModel
module CommonModel # :nodoc: all
NSPOOL = {}
ELEMENTS = []
......
end
end
module ContentModel
module ContentModel # :nodoc: all
module ClassMethods
def content_type
@content_type ||= nil
......
end
end
module URIContentModel
module URIContentModel # :nodoc: all
class << self
def append_features(klass)
super
......
# which is used to store small quantities of human-readable text
#
# The TextConstruct has a type attribute, e.g. text, html, xhtml
module TextConstruct
module TextConstruct # :nodoc: all
def self.append_features(klass)
super
klass.class_eval do
......
# used to describe a person, corporation, or similar entity
#
# The PersonConstruct has a Name, Uri, and Email child elements
module PersonConstruct
module PersonConstruct # :nodoc: all
# Adds attributes for name, uri, and email to the +klass+
def self.append_features(klass)
......
# Examples:
# * 2013-03-04T15:30:02Z
# * 2013-03-04T10:30:02-05:00
module DateConstruct
module DateConstruct # :nodoc: all
def self.append_features(klass)
super
klass.class_eval do
......
end
end
module DuplicateLinkChecker
module DuplicateLinkChecker # :nodoc: all
# Checks if there are duplicate links with the same type and hreflang attributes
# that have an alternate (or empty) rel attribute
#
......
# Atom feed element
#
# A Feed has several metadata attributes in addition to a number of Entry child elements
class Feed < RSS::Element
class Feed < RSS::Element # :nodoc: all
include RootElementMixin
include CommonModel
include DuplicateLinkChecker
......
# Defines a top-level Atom Entry element
#
class Entry < RSS::Element
class Entry < RSS::Element # :nodoc: all
include RootElementMixin
include CommonModel
include DuplicateLinkChecker
......
BaseListener.install_get_text_element(Atom::URI, name, "#{name}=")
end
module ListenerMixin
module ListenerMixin # :nodoc: all
private
def initial_start_feed(tag_name, prefix, attrs, ns)
check_ns(tag_name, prefix, ns, Atom::URI, false)
    (1-1/1)