Method: GoogleApps::Atom::Node#get_values

Defined in:
lib/google_apps/atom/node.rb

#get_values(element, key_attrib, value = 'value') ⇒ Object

get_values returns an array of all the value attributes on elements matching the given key_attrib pair on the specified element type.



92
93
94
95
96
97
# File 'lib/google_apps/atom/node.rb', line 92

def get_values(element, key_attrib, value = 'value')
  self.find('//' + element).inject([]) do |values, element|
    values << element.attributes[value] if element.attributes[key_attrib[0]].match key_attrib[1]
    values
  end
end