In Files

  • rss/maker/taxonomy.rb

Class/Module Index [+]

Quicksearch

RSS::Maker::TaxonomyTopicsModel

Public Class Methods

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

        klass.add_need_initialize_variable("taxo_topics", "make_taxo_topics")
        klass.add_other_element("taxo_topics")
        klass.module_eval("          attr_reader :taxo_topics
          def make_taxo_topics
            self.class::TaxonomyTopics.new(@maker)
          end
            
          def setup_taxo_topics(rss, current)
            @taxo_topics.to_rss(rss, current)
          end
", __FILE__, __LINE__ + 1)
      end
            
install_taxo_topics(klass) click to toggle source
 
               # File rss/maker/taxonomy.rb, line 25
      def self.install_taxo_topics(klass)
        klass.module_eval("          class TaxonomyTopics < TaxonomyTopicsBase
            def to_rss(rss, current)
              if current.respond_to?(:taxo_topics)
                topics = current.class::TaxonomyTopics.new
                bag = topics.Bag
                @resources.each do |resource|
                  bag.lis << RDF::Bag::Li.new(resource)
                end
                current.taxo_topics = topics
              end
            end
          end
", *Utils.get_file_and_line_from_caller(1))
      end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus