diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-03 14:01:42 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-03 14:01:42 +0000 |
commit | 1a235738a8533edfe9314d79d327e2d2759366dc (patch) | |
tree | 67529f9b68a7fb04898f438d654bbd3157b11878 /lib/rss/content.rb | |
parent | 7376af3092722b2d4c16e236b3cd530c3de07543 (diff) |
* lib/rss/2.0.rb, lib/rss/content.rb, lib/rss/dublincore.rb,
lib/rss/rss.rb, lib/rss/syndication.rb: removed warnings.
* lib/rss/converter.rb: removed handling load error of nkf.
* test/rss/test_syndication.rb, test/rss/test_trackback.rb,
test/rss/test_dublincore.rb, test/rss/test_content.rb: replaced
'require "rss/parser"' by 'require "rss/1.0"'.
* test/rss/test_parser.rb, test/rss/test_accessor.rb: removed
'require "rss/parser"'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/content.rb')
-rw-r--r-- | lib/rss/content.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/rss/content.rb b/lib/rss/content.rb index 3bb82f987c..fae0b687be 100644 --- a/lib/rss/content.rb +++ b/lib/rss/content.rb @@ -13,9 +13,13 @@ module RSS ELEMENTS = [] - %w(encoded).each do |x| - install_text_element("#{CONTENT_PREFIX}_#{x}") - end + def self.included(mod) + mod.module_eval(<<-EOC) + %w(encoded).each do |x| + install_text_element("\#{CONTENT_PREFIX}_\#{x}") + end + EOC + end def content_validate(tags) counter = {} @@ -38,6 +42,7 @@ module RSS end prefix_size = CONTENT_PREFIX.size + 1 + ContentModel::ELEMENTS.uniq! ContentModel::ELEMENTS.each do |x| BaseListener.install_get_text_element(x[prefix_size..-1], CONTENT_URI, "#{x}=") end |