I have an array in ruby and i want to change the values of it's elements dynamically depending on a particular attribute. Suppose i have an array,
array = [123,134,145,515]
And i want to manipulate this elements like getting all the elements multiplied by a parameter, how can i get it done without having to do it explicitly each time using for loop?