Archives - 23 November 2012, Friday

  • flat_map (Enumerable)

    apidock.com 23 Nov '12, 10pm

    Returns a new array with the concatenated results of running block once for every element in enum . If no block is given, an enumerator is returned instead. [[ 1 , 2 ],[ 3 , 4 ]]. flat_map {| i | i } #=> [1, 2, 3, 4]