Skip to content

Instantly share code, notes, and snippets.

@jeffrydegrande
Created November 5, 2010 20:04
Show Gist options
  • Save jeffrydegrande/664697 to your computer and use it in GitHub Desktop.
Save jeffrydegrande/664697 to your computer and use it in GitHub Desktop.
def self.guid_from_entry(entry)
result = ''
[:guid, :url, :content, :summary].each do |sym|
next unless entry.respond_to?(sym) and entry.send(sym).present?
result = Digest::MD5.hexdigest(entry.send(sym))
break
end
result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment