Method: Connect::ExtendedArray#extract

Defined in:
lib/connect/extended_array.rb

#extract(element) ⇒ Object

return an array with the specfied element extracted from the hashes. For this method to work, your array must be filled with objects or Hashes

Parameters:

  • element (String)

    the element to extract

[View source]

13
14
15
# File 'lib/connect/extended_array.rb', line 13

def extract(element)
  collect { |e| e.send(element) }
end