Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/helpers.rb

Instance Method Summary collapse

Instance Method Details

#clean_atom_junkObject

atom/feed fudges up the atom feed google gives us so we have to manually insert some stuff



5
6
7
8
9
# File 'lib/helpers.rb', line 5

def clean_atom_junk
  str = self
  str = str.sub(/ xmlns/," xmlns:gd='http://schemas.google.com/g/2005' xmlns") unless str =~ /xmlns:gd/
  "<?xml version='1.0' encoding='utf-8'?>" + str.gsub(/ etag='.*?' /," ")
end