~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to lib/rss/maker/content.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
      def self.append_features(klass)
8
8
        super
9
9
 
10
 
        ::RSS::ContentModel::ELEMENTS.each do |element|
11
 
          klass.add_need_initialize_variable(element)
12
 
          klass.add_other_element(element)
13
 
          klass.module_eval(<<-EOC, __FILE__, __LINE__+1)
14
 
            attr_accessor :#{element}
15
 
            def setup_#{element}(rss, current)
16
 
              if #{element} and current.respond_to?(:#{element}=)
17
 
                current.#{element} = @#{element} if @#{element}
18
 
              end
19
 
            end
20
 
          EOC
 
10
        ::RSS::ContentModel::ELEMENTS.each do |name|
 
11
          klass.def_other_element(name)
21
12
        end
22
13
      end
23
14
    end