I don't know if I'm reading your question right but you have something like:

Class A
   def foo
     ....
    end
end

and in some other file

Class B
   def bar
   ....
   end
end

and say, for example you want to use def bar outside of Class B?

If so, you can just do:

someVar = B.new()
b.bar()





On 7/21/05, boni uday <[EMAIL PROTECTED]> wrote:
>  
>  
> I want to access a  method (def) which is defined in one class from another 
>  
> class in ruby. 
>  
> pls help me 
>  
> Thank u  
> 
> ________________________________
> How much free photo storage do you get? Store your friends n family photos
> for FREE with Yahoo! Photos. 
> http://in.photos.yahoo.com 
> 
> 
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 
> 
>

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to