diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-20 11:50:52 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-20 11:50:52 +0000 |
commit | 028e6396c043119448afce67ebf8f3aafc96e27e (patch) | |
tree | f7becf9f31f4b06efa89c290ca14bbde1e82a864 /lib/rss/image.rb | |
parent | 75823801a26e35d215fbfd243bd9bd6619a84eca (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/image.rb')
-rw-r--r-- | lib/rss/image.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rss/image.rb b/lib/rss/image.rb index 624bc6aceb..3058c84a59 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 |