def map(key = nil, &block)
      m = []
      key ? each {|d| m << d[key]} : each {|d| m << block[d]}
      m
    end
def map(key = nil, &block)
      m = []
      key ? each {|d| m << d[key]} : each {|d| m << block[d]}
      m
    end
def map ( key = nil , & block ) m = [ ] key ? each { | d | m << d [ key ] } : each { | d | m << block [ d ] } m end
Extend map to accept key argument, allowing stuff like:
   map(:path) # equivalent to map {|d| d[:path]}
Extend map to accept key argument allowing stuff like : map ( : path ) # equivalent to map { |d| d [ : path ] }