method

including

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Array
including(*elements) public

Returns a new array that includes the passed elements.

[ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ]
[ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ]
Show source
Register or log in to add new notes.