In Files

  • rss-0.2.9/lib/rss/maker/taxonomy.rb

Class/Module Index [+]

Quicksearch

RSS::Maker::TaxonomyTopicModel

Public Class Methods

append_features(klass) click to toggle source
 
               # File rss-0.2.9/lib/rss/maker/taxonomy.rb, line 41
def self.append_features(klass)
  super

  class_name = "TaxonomyTopics"
  klass.def_classed_elements("#{TAXO_PREFIX}_topic", "value", class_name)
end
            
install_taxo_topic(klass) click to toggle source
 
               # File rss-0.2.9/lib/rss/maker/taxonomy.rb, line 48
      def self.install_taxo_topic(klass)
        klass.module_eval("          class TaxonomyTopics < TaxonomyTopicsBase
            class TaxonomyTopic < TaxonomyTopicBase
              DublinCoreModel.install_dublin_core(self)
              TaxonomyTopicsModel.install_taxo_topics(self)

              def to_feed(feed, current)
                if current.respond_to?(:taxo_topics)
                  topic = current.class::TaxonomyTopic.new(value)
                  topic.taxo_link = value
                  taxo_topics.to_feed(feed, topic) if taxo_topics
                  current.taxo_topics << topic
                  setup_other_elements(feed, topic)
                end
              end
            end
          end
", __FILE__, __LINE__ + 1)
      end