Over a million developers have joined DZone.

Array.take

·

class Array
  # [:a,:b].take(:to_s) #=> ['a','b']
  def take(property)
    collect {|obj| obj.send(property)}
  end
end
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}