Flowdock
method

to

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: Array
to(position) public

Returns the beginning of the array up to position.

%w( a b c d ).to(0)  # => ["a"]
%w( a b c d ).to(2)  # => ["a", "b", "c"]
%w( a b c d ).to(10) # => ["a", "b", "c", "d"]
%w().to(0)           # => []
Show source
Register or log in to add new notes.