summaryrefslogtreecommitdiffstats
path: root/lib/rss/image.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
commitd0f46150db3f998b0154431706b62bb0aaf481da (patch)
treef7becf9f31f4b06efa89c290ca14bbde1e82a864 /lib/rss/image.rb
parent9ce2dd8ecdbeda58ce09650827ca52d3655b4199 (diff)
downloadruby-d0f46150db3f998b0154431706b62bb0aaf481da.tar.gz
ruby-d0f46150db3f998b0154431706b62bb0aaf481da.tar.xz
ruby-d0f46150db3f998b0154431706b62bb0aaf481da.zip
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/image.rb')
-rw-r--r--lib/rss/image.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rss/image.rb b/lib/rss/image.rb
index 624bc6ace..3058c84a5 100644
--- a/lib/rss/image.rb
+++ b/lib/rss/image.rb
@@ -33,9 +33,9 @@ module RSS
def self.append_features(klass)
super
- klass.install_have_child_element("#{IMAGE_PREFIX}_item")
+ klass.install_have_child_element("item", IMAGE_URI, "?",
+ "#{IMAGE_PREFIX}_item")
klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI)
- klass.install_model("item", IMAGE_URI, "?")
end
class ImageItem < Element
@@ -67,7 +67,8 @@ module RSS
%w(width height).each do |tag|
full_name = "#{IMAGE_PREFIX}_#{tag}"
disp_name = "#{IMAGE_PREFIX}:#{tag}"
- install_text_element(full_name, :integer, disp_name)
+ install_text_element(tag, IMAGE_URI, "?",
+ full_name, :integer, disp_name)
BaseListener.install_get_text_element(IMAGE_URI, tag, "#{full_name}=")
end
@@ -119,9 +120,9 @@ module RSS
super
unless klass.class == Module
- klass.install_have_child_element("#{IMAGE_PREFIX}_favicon")
+ klass.install_have_child_element("favicon", IMAGE_URI, "?",
+ "#{IMAGE_PREFIX}_favicon")
klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI)
- klass.install_model("favicon", IMAGE_URI, "?")
end
end