From: King Maker on 26 May 2010 08:40 Hello frends, I write the method on one file and call this method on another file but the problem is they not find the method of the another file in first file i write:file_name=first.rb def a() puts "hello world" end in second file i write:file_name=second.rb reqire 'd:\test\first.rb' a() its correct or not -- Posted via http://www.ruby-forum.com/.
From: Intransition on 26 May 2010 11:39 On May 26, 8:40 am, King Maker <sweetzub...(a)gmail.com> wrote: > Hello frends, > > I write the method on one file and call this method on another file but > the problem is they not find the method of the another file > > in first file i write:file_name=first.rb > > def a() > puts "hello world" > end > > in second file i write:file_name=second.rb > > reqire 'd:\test\first.rb' > > a() fix 'require' typo, but other than that is looks fine.
From: King Maker on 27 May 2010 00:59 Thomas Sawyer wrote: > On May 26, 8:40�am, King Maker <sweetzub...(a)gmail.com> wrote: >> >> in second file i write:file_name=second.rb >> >> reqire 'd:\test\first.rb' >> >> a() > > fix 'require' typo, but other than that is looks fine. ohhhhhhhhhh thanks...........!!!!!!! -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: Regarding Arrays Next: round the floating point to nearest halfpoint |