Module: RSS::Maker::TaxonomyTopicsModel

Defined Under Namespace

Classes: TaxonomyTopicsBase

Class Method Summary collapse

Class Method Details

.append_features(klass) ⇒ Object



8
9
10
11
12
13
# File 'lib/rss/maker/taxonomy.rb', line 8

def self.append_features(klass)
  super

  klass.def_classed_element("#{RSS::TAXO_PREFIX}_topics",
                            "TaxonomyTopics")
end

.install_taxo_topics(klass) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rss/maker/taxonomy.rb', line 15

def self.install_taxo_topics(klass)
  klass.module_eval("class TaxonomyTopics < TaxonomyTopicsBase\ndef to_feed(feed, current)\nif current.respond_to?(:taxo_topics)\ntopics = current.class::TaxonomyTopics.new\nbag = topics.Bag\[email protected] do |resource|\nbag.lis << RDF::Bag::Li.new(resource)\nend\ncurrent.taxo_topics = topics\nend\nend\nend\n", __FILE__, __LINE__ + 1)
end