method

first

v2_1_10 - Show latest stable - Class: Range
first(p1)
public

Returns the first object in the range, or an array of the first n elements.

(10..20).first     #=> 10
(10..20).first(3)  #=> [10, 11, 12]