aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rss
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 05:56:09 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 05:56:09 +0000
commit08936ea399c6d3cfdbf6822f5f7f2f209ed516a0 (patch)
tree277af9b51fb49077d9b51c047f158cf769551c42 /lib/rss
parent34cbe5ac063457bf58eeec4256f262215eeb57fe (diff)
downloadruby-08936ea399c6d3cfdbf6822f5f7f2f209ed516a0.tar.gz
* lib/rss/*: [DOC] document various constants @steveklabnik [Bug #8812]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss')
-rw-r--r--lib/rss/content.rb2
-rw-r--r--lib/rss/dublincore.rb2
-rw-r--r--lib/rss/image.rb4
-rw-r--r--lib/rss/itunes.rb2
-rw-r--r--lib/rss/parser.rb2
-rw-r--r--lib/rss/slash.rb2
-rw-r--r--lib/rss/syndication.rb3
-rw-r--r--lib/rss/taxonomy.rb4
8 files changed, 19 insertions, 2 deletions
diff --git a/lib/rss/content.rb b/lib/rss/content.rb
index b12ee918aa..5a2120c067 100644
--- a/lib/rss/content.rb
+++ b/lib/rss/content.rb
@@ -1,7 +1,9 @@
require "rss/rss"
module RSS
+ # The prefix for the Content XML namespace.
CONTENT_PREFIX = 'content'
+ # The URI of the Content specification.
CONTENT_URI = "http://purl.org/rss/1.0/modules/content/"
module ContentModel
diff --git a/lib/rss/dublincore.rb b/lib/rss/dublincore.rb
index 53a4ca70d6..58424141cd 100644
--- a/lib/rss/dublincore.rb
+++ b/lib/rss/dublincore.rb
@@ -1,7 +1,9 @@
require "rss/rss"
module RSS
+ # The prefix for the Dublin Core XML namespace.
DC_PREFIX = 'dc'
+ # The URI of the Dublin Core specification.
DC_URI = "http://purl.org/dc/elements/1.1/"
module BaseDublinCoreModel
diff --git a/lib/rss/image.rb b/lib/rss/image.rb
index e79e9f5e65..b0619141bb 100644
--- a/lib/rss/image.rb
+++ b/lib/rss/image.rb
@@ -3,11 +3,15 @@ require 'rss/dublincore'
module RSS
+ # The prefix for the Image XML namespace.
IMAGE_PREFIX = 'image'
+ # The URI for the Image specification.
IMAGE_URI = 'http://purl.org/rss/1.0/modules/image/'
RDF.install_ns(IMAGE_PREFIX, IMAGE_URI)
+ # This constant holds strings which contain the names of
+ # image elements, with the appropriate prefix.
IMAGE_ELEMENTS = []
%w(item favicon).each do |name|
diff --git a/lib/rss/itunes.rb b/lib/rss/itunes.rb
index f95ca7aa2e..e6de5c1ca2 100644
--- a/lib/rss/itunes.rb
+++ b/lib/rss/itunes.rb
@@ -1,7 +1,9 @@
require 'rss/2.0'
module RSS
+ # The prefix for the iTunes XML namespace.
ITUNES_PREFIX = 'itunes'
+ # The URI of the iTunes specification.
ITUNES_URI = 'http://www.itunes.com/dtds/podcast-1.0.dtd'
Rss.install_ns(ITUNES_PREFIX, ITUNES_URI)
diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb
index c426a187b8..1b6e4e9596 100644
--- a/lib/rss/parser.rb
+++ b/lib/rss/parser.rb
@@ -545,6 +545,7 @@ module RSS
end
unless const_defined? :AVAILABLE_PARSER_LIBRARIES
+ # The list of all available libraries for parsing.
AVAILABLE_PARSER_LIBRARIES = [
["rss/xmlparser", :XMLParserParser],
["rss/xmlscanner", :XMLScanParser],
@@ -552,6 +553,7 @@ module RSS
]
end
+ # The list of all available parsers, in constant form.
AVAILABLE_PARSERS = []
AVAILABLE_PARSER_LIBRARIES.each do |lib, parser|
diff --git a/lib/rss/slash.rb b/lib/rss/slash.rb
index f102413b46..65c61142e1 100644
--- a/lib/rss/slash.rb
+++ b/lib/rss/slash.rb
@@ -1,7 +1,9 @@
require 'rss/1.0'
module RSS
+ # The prefix for the Slash XML namespace.
SLASH_PREFIX = 'slash'
+ # The URI of the Slash specification.
SLASH_URI = "http://purl.org/rss/1.0/modules/slash/"
RDF.install_ns(SLASH_PREFIX, SLASH_URI)
diff --git a/lib/rss/syndication.rb b/lib/rss/syndication.rb
index c375645dd6..77a84b9a2a 100644
--- a/lib/rss/syndication.rb
+++ b/lib/rss/syndication.rb
@@ -1,8 +1,9 @@
require "rss/1.0"
module RSS
-
+ # The prefix for the Syndication XML namespace.
SY_PREFIX = 'sy'
+ # The URI of the Syndication specification.
SY_URI = "http://purl.org/rss/1.0/modules/syndication/"
RDF.install_ns(SY_PREFIX, SY_URI)
diff --git a/lib/rss/taxonomy.rb b/lib/rss/taxonomy.rb
index b82e55dacc..b7fbe6b0de 100644
--- a/lib/rss/taxonomy.rb
+++ b/lib/rss/taxonomy.rb
@@ -2,12 +2,14 @@ require "rss/1.0"
require "rss/dublincore"
module RSS
-
+ # The prefix for the Taxonomy XML namespace.
TAXO_PREFIX = "taxo"
+ # The URI for the specification of the Taxonomy XML namespace.
TAXO_URI = "http://purl.org/rss/1.0/modules/taxonomy/"
RDF.install_ns(TAXO_PREFIX, TAXO_URI)
+ # The listing of all the taxonomy elements, with the appropriate namespace.
TAXO_ELEMENTS = []
%w(link).each do |name|