From: Noose Dinli on 28 Jun 2010 00:48 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 28 Jun 2010 00:56 [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 28 Jun 2010 01:05 thanks for you josh -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: About method naming convention with "!" Next: gem rake error |