diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-05 07:03:43 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-05 07:03:43 +0000 |
commit | 5f3a36794a578eabbc67b401e818b3711051b7ad (patch) | |
tree | 2c32372b848d7b2a52c50feb5dc384fc8fe88245 /lib/rss/taxonomy.rb | |
parent | 56ce2994de24b14905f0b23ec35aeb0e3b4ff563 (diff) | |
download | ruby-5f3a36794a578eabbc67b401e818b3711051b7ad.tar.gz |
* lib/rss/*: refactored.
- gave a name to 'x'.
- undef_method -> remove_method for avoiding a warning in ruby 1.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/taxonomy.rb')
-rw-r--r-- | lib/rss/taxonomy.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rss/taxonomy.rb b/lib/rss/taxonomy.rb index 173214dffb..f70d475a11 100644 --- a/lib/rss/taxonomy.rb +++ b/lib/rss/taxonomy.rb @@ -11,17 +11,17 @@ module RSS TAXO_ELEMENTS = [] - %w(link).each do |x| - if const_defined? :Listener - Listener.install_get_text_element(TAXO_NS, x, "#{TAXO_PREFIX}_#{x}=") - end - TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{x}" + %w(link).each do |name| + full_name = "#{TAXO_PREFIX}_#{name}" + BaseListener.install_get_text_element(TAXO_NS, name, "#{full_name}=") + TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}" end module TaxonomyModel attr_writer(*%w(title description creator subject publisher contributor date format identifier source - language relation coverage rights).collect{|x| "#{TAXO_PREFIX}_#{x}"}) + language relation coverage rights + ).collect{|name| "#{TAXO_PREFIX}_#{name}"}) end class Channel; extend TaxonomyModel; end |