summaryrefslogtreecommitdiff
path: root/lib/rss/2.0.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-20 11:50:52 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-20 11:50:52 +0000
commit028e6396c043119448afce67ebf8f3aafc96e27e (patch)
treef7becf9f31f4b06efa89c290ca14bbde1e82a864 /lib/rss/2.0.rb
parent75823801a26e35d215fbfd243bd9bd6619a84eca (diff)
* lib/rss/rss.rb: hide RSS::Element.install_model.
(RSS::Element.install_have_child_element, RSS::Element.install_have_children_element, RSS::Element.install_text_element, RSS::Element.install_date_element): call RSS::Element.install_model internally. * lib/rss/0.9.rb: followed new API. * lib/rss/1.0.rb: ditto. * lib/rss/2.0.rb: ditto. * lib/rss/content.rb: ditto. * lib/rss/dublincore.rb: ditto. * lib/rss/image.rb: ditto. * lib/rss/syndication.rb: ditto. * lib/rss/taxonomy.rb: ditto. * lib/rss/trackback.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/2.0.rb')
-rw-r--r--lib/rss/2.0.rb17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/rss/2.0.rb b/lib/rss/2.0.rb
index 8d76411df6..24cfb7c6e5 100644
--- a/lib/rss/2.0.rb
+++ b/lib/rss/2.0.rb
@@ -10,17 +10,15 @@ module RSS
["generator"],
["ttl", :integer],
].each do |name, type|
- install_text_element(name, type)
- install_model(name, "", '?')
+ install_text_element(name, "", "?", name, type)
end
[
%w(category categories),
].each do |name, plural_name|
- install_have_children_element(name, plural_name)
- install_model(name, "", '*')
+ install_have_children_element(name, "", "*", name, plural_name)
end
-
+
[
["image", "?"],
["language", "?"],
@@ -57,15 +55,13 @@ module RSS
["comments", "?"],
["author", "?"],
].each do |name, occurs|
- install_text_element(name)
- install_model(name, "", occurs)
+ install_text_element(name, "", occurs)
end
[
["pubDate", '?'],
].each do |name, occurs|
- install_date_element(name, 'rfc822')
- install_model(name, "", occurs)
+ install_date_element(name, "", occurs, name, 'rfc822')
end
alias date pubDate
alias date= pubDate=
@@ -73,8 +69,7 @@ module RSS
[
["guid", '?'],
].each do |name, occurs|
- install_have_child_element(name)
- install_model(name, "", occurs)
+ install_have_child_element(name, "", occurs)
end
private