diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-16 04:51:15 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-16 04:51:15 +0000 |
| commit | ce1c652ad2bcd616f2822c11d183ad2ff3ef9b97 (patch) | |
| tree | e1d33d49cca9875ec515d3ee4ed0dc2686432941 /lib/rss/taxonomy.rb | |
| parent | b84c17591829c9f359fe806a9f57e9c99c662f9c (diff) | |
| download | ruby-ce1c652ad2bcd616f2822c11d183ad2ff3ef9b97.tar.gz ruby-ce1c652ad2bcd616f2822c11d183ad2ff3ef9b97.tar.xz ruby-ce1c652ad2bcd616f2822c11d183ad2ff3ef9b97.zip | |
* lib/rss/: untabified.
* test/rss/: untabified.
* lib/rss/0.9.rb (RSS::Rss#to_s): inent -> indent.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/taxonomy.rb')
| -rw-r--r-- | lib/rss/taxonomy.rb | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/rss/taxonomy.rb b/lib/rss/taxonomy.rb index 5b11d338e..bec6ea3c1 100644 --- a/lib/rss/taxonomy.rb +++ b/lib/rss/taxonomy.rb @@ -4,29 +4,29 @@ require "rss/1.0" module RSS - TAXO_PREFIX = "taxo" - TAXO_NS = "http://purl.org/rss/1.0/modules/taxonomy/" + TAXO_PREFIX = "taxo" + TAXO_NS = "http://purl.org/rss/1.0/modules/taxonomy/" - Element.install_ns(TAXO_PREFIX, TAXO_NS) + Element.install_ns(TAXO_PREFIX, TAXO_NS) - TAXO_ELEMENTS = [] + TAXO_ELEMENTS = [] - %w(link).each do |x| - if const_defined? :Listener - Listener.install_get_text_element(x, TAXO_NS, "#{TAXO_PREFIX}_#{x}=") - end - TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{x}" - 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}"}) - end - - class Channel; extend TaxonomyModel; end - class Item; extend TaxonomyModel; end - class Image; extend TaxonomyModel; end - class TextInput; extend TaxonomyModel; end - + %w(link).each do |x| + if const_defined? :Listener + Listener.install_get_text_element(x, TAXO_NS, "#{TAXO_PREFIX}_#{x}=") + end + TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{x}" + 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}"}) + end + + class Channel; extend TaxonomyModel; end + class Item; extend TaxonomyModel; end + class Image; extend TaxonomyModel; end + class TextInput; extend TaxonomyModel; end + end |
