concat

ary.concat(other_ary) â ary
Instance Public methods

Appends the elements of other_ary to self.

[ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a                                 #=> [ 1, 2, 3, 4, 5 ]

See also Array#+.

doc_ruby_on_rails
2015-03-30 16:02:45
Comments
Leave a Comment

Please login to continue.