Module: Google::Geo::Parser
Overview
:nodoc:
Instance Method Summary collapse
-
#fetch(element) ⇒ Object
Fetch contents of an XML element of the response.
-
#fetch_accuracy ⇒ Object
Like fetch, but for the only piece of data locked away in an attribute.
Instance Method Details
#fetch(element) ⇒ Object
Fetch contents of an XML element of the response.
59 60 61 |
# File 'lib/google/geo.rb', line 59 def fetch(element) #:nodoc: @xml.slice %r{<#{element}>(.+?)</#{element}>}, 1 end |
#fetch_accuracy ⇒ Object
Like fetch, but for the only piece of data locked away in an attribute.
64 65 66 |
# File 'lib/google/geo.rb', line 64 def fetch_accuracy #:nodoc: @xml.slice(%r{Accuracy="([^"]+)">}, 1).to_i end |