From: James Edward Gray II Date: 2006-12-06T02:55:48+09:00 Subject: Re: Invoking a Method On Dec 5, 2006, at 11:48 AM, Parv G. wrote: > Hi, > Newbie Question: > > How do i invoke a method in belonging to a module? > > For Example: > ############### > #file: SampleModule.rb > > Module SampleModule module_function > def add(a, b) > return a + b > end > > def multiply(a, b) > return a * b > end > > end > > ################ > #file: test.rb > > require 'SampleModule.rb' > #here i would like to make a call to add() method of Module > SampleModule > (sitting in file: SampleModule.rb) > help?? SampleModule.add(1, 2) Hope that helps. James Edward Gray II