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

« back to all changes in this revision

Viewing changes to lib/rss/maker/feed.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:
64
64
                @maker.items.all? {|item| item.author.to_s.empty?}
65
65
              vars << "author"
66
66
            end
67
 
            vars << "title" unless title.have_required_values?
 
67
            vars << "title" unless title {|t| t.have_required_values?}
68
68
            vars
69
69
          end
70
70
 
148
148
          def to_feed(feed)
149
149
            logo = feed.class::Logo.new
150
150
            class << logo
151
 
              alias url= content=
 
151
              alias_method(:url=, :content=)
152
152
            end
153
153
            set = setup_values(logo)
154
154
            class << logo
155
 
              undef url=
 
155
              remove_method(:url=)
156
156
            end
157
157
            if set
158
158
              feed.logo = logo
194
194
 
195
195
            def have_required_values?
196
196
              set_default_values do
197
 
                super and title.have_required_values?
 
197
                super and title {|t| t.have_required_values?}
198
198
              end
199
199
            end
200
200
 
209
209
 
210
210
            def not_set_required_variables
211
211
              vars = super
212
 
              vars << "title" unless title.have_required_values?
 
212
              vars << "title" unless title {|t| t.have_required_values?}
213
213
              vars
214
214
            end
215
215
 
282
282
                def to_feed(feed, current)
283
283
                  icon = current.class::Icon.new
284
284
                  class << icon
285
 
                    alias url= content=
 
285
                    alias_method(:url=, :content=)
286
286
                  end
287
287
                  set = setup_values(icon)
288
288
                  class << icon
289
 
                    undef url=
 
289
                    remove_method(:url=)
290
290
                  end
291
291
                  if set
292
292
                    current.icon = icon