From d5b6a7b16947aaf4821d6b76c7de153866fb30c0 Mon Sep 17 00:00:00 2001 From: kou Date: Wed, 3 Nov 2004 06:43:18 +0000 Subject: * test/rss/*.rb: removed tab width configuration headers. * test/rss/test_maker_{0.9,1.0}.rb: sort -> do_sort. * lib/rss/maker/*.rb: changed API to RSS version independence. * lib/rss/maker/base.rb (RSS::Maker::XMLStyleSheets::XMLStyleSheet): checked required (pseudo) attributes. * lib/rss/maker/base.rb (RSS::Maker::Items): sort -> do_sort. * lib/rss/rss.rb (RSS::BaseModel.install_date_element): avoided warning. * lib/rss/0.9.rb (RSS::Rss#textinput): added convenience method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rss/maker/content.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/rss/maker/content.rb') diff --git a/lib/rss/maker/content.rb b/lib/rss/maker/content.rb index 67b237f4ef..96f3ccb6d9 100644 --- a/lib/rss/maker/content.rb +++ b/lib/rss/maker/content.rb @@ -13,17 +13,17 @@ module RSS klass.__send__(:attr_accessor, element) klass.module_eval(<<-EOC, __FILE__, __LINE__) def setup_#{element}(rss, current) - current.#{element} = @#{element} if @#{element} + if #{element} and current.respond_to?(:#{element}=) + current.#{element} = @#{element} if @#{element} + end end -EOC + EOC end end end - class RSS10 - class Items - class Item; include ContentModel; end - end + class ItemsBase + class ItemBase; include ContentModel; end end end end -- cgit v1.2.3