Thursday, January 6, 2011

How to append to an array in ruby

To add elements and incorporate them into a base array:
base_array.concat appen_this_array

to add single items, just push:
base_array.push(this_item)

No comments:

Post a Comment