From: Noah Easterly Date: 2006-08-29T23:55:44+09:00 Subject: Re: Extending class from other module module Mod1 class A1 end end module Mod2 class B1 end end class Mod1::B2 < Mod2::B1 end Alexander Rysenko wrote: > 1st question: If I got it right, modules in Ruby can be used as > namespaces. Is it ok? Is there some other (preffered) way? > > 2nd question: I need to extend some class from one module in another > one. Basically I do something like this: > > module Mod1 > class A1 > end > > class B2 < Mod2::B1 > end > end > > module Mod2 > class B1 > end > end > > But this doesn't really work (seems like B1 isn't really found). How can > I do such a thing? > > -- > Posted via http://www.ruby-forum.com/.