From: Noose Dinli on
hi ruby

example i have this method:

def little_meth
puts "hi there\n"
end

and say i want to run this method run x number of times.

i make program that looks something this way:

do
little_meth
x times

i request what is this for ruby?

thanks

-noose
--
Posted via http://www.ruby-forum.com/.

From: Josh Cheek on
[Note: parts of this message were removed to make it a legal post.]

On Sun, Jun 27, 2010 at 11:48 PM, Noose Dinli <unter_noob(a)yahoo.com.au>wrote:

> hi ruby
>
> example i have this method:
>
> def little_meth
> puts "hi there\n"
> end
>
> and say i want to run this method run x number of times.
>
> i make program that looks something this way:
>
> do
> little_meth
> x times
>
> i request what is this for ruby?
>
> thanks
>
> -noose
> --
> Posted via http://www.ruby-forum.com/.
>
>


def little_meth
puts "hi there\n"
end

x = 10

# either of these will work
x.times { little_meth }

x.times do
little_meth
end

From: Noose Dinli on
thanks for you josh
--
Posted via http://www.ruby-forum.com/.