# File lib/feedzirra/feed_utilities.rb, line 23 def has_new_entries? new_entries.size > 0 end
# File lib/feedzirra/feed_utilities.rb, line 8 def last_modified @last_modified ||= begin entry = entries.reject {|e| e.published.nil? }.sort_by { |entry| entry.published if entry.published }.last entry ? entry.published : nil end end
# File lib/feedzirra/feed_utilities.rb, line 19 def new_entries @new_entries ||= [] end
# File lib/feedzirra/feed_utilities.rb, line 46 def sanitize_entries! entries.each {|entry| entry.sanitize!} end
# File lib/feedzirra/feed_utilities.rb, line 38 def update_attribute(feed, name) old_value, new_value = send(name), feed.send(name) if old_value != new_value send("#{name}=", new_value) end end
# File lib/feedzirra/feed_utilities.rb, line 27 def update_from_feed(feed) self.new_entries += find_new_entries_for(feed) self.entries.unshift(*self.new_entries) @updated = false UPDATABLE_ATTRIBUTES.each do |name| updated = update_attribute(feed, name) @updated ||= updated end end
Generated with the Darkfish Rdoc Generator 2.