I am writing a code that has lines limit of a method so I am trying to write the shortest possible version of this loop :
for i in (0..number)
#lines of code
end
I was wondering if there is a way to do it somehow similar to:
{
#lines of code
}*number
In general I am looking for the shortest possible way of writing something like this.
some way to do a loop/iterator
or