Class: GData4Ruby::Utils
- Inherits:
-
Object
- Object
- GData4Ruby::Utils
- Defined in:
- lib/gdata4ruby/utils/utils.rb
Overview
A helper class that includes commonly used utility methods.
Class Method Summary collapse
-
.add_namespaces(entry) ⇒ Object
Adds common Google namespaces to an element.
Class Method Details
.add_namespaces(entry) ⇒ Object
Adds common Google namespaces to an element. Useful for processing individual events returned from in a feed.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gdata4ruby/utils/utils.rb', line 22 def self.add_namespaces(entry) entry.attributes["xmlns:openSearch"] = "http://a9.com/-/spec/opensearch/1.1/" entry.attributes["xmlns:gAcl"] = "http://schemas.google.com/acl/2007" entry.attributes["xmlns:gCal"] = "http://schemas.google.com/gCal/2005" entry.attributes["xmlns:gd"] = "http://schemas.google.com/g/2005" entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app" entry.attributes["xmlns:docs"] = "http://schemas.google.com/docs/2007" entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom" entry.attributes["xmlns:georss"] = "http://www.georss.org/georss" entry.attributes["xmlns:gml"] = "http://www.opengis.net/gml" entry end |