From: Jay Pangmi Date: 2008-09-11T21:48:54+09:00 Subject: Re: define and call methods in ruby David A. Black wrote: > This will get you started: > > class Myclass > def method_to_call > puts "Hello!" > end > end > > object = Myclass.new > object.method_to_call > > It's the object (the instance of Myclass) that can execute the method. > > > David Thanks David for the help, but just kinda suprised, wouldn't it be for method that's being called from another class (no offense, just my view from my lil knowledge of java). If what you are saying is what should be for method calls in the same class then can you please lighten me up a bit coz I'm new to ruby as well. I mean method calls as: ================================================================================ class myclass if something then do_something end #implementation of do_something method. def do_something here something is done.. end end ================================================================================ Thanks again... -- Posted via http://www.ruby-forum.com/.