summaryrefslogtreecommitdiff
path: root/lib/rss/taxonomy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rss/taxonomy.rb')
-rw-r--r--lib/rss/taxonomy.rb12
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