On 14 April 2010 01:45, Me <chabg...@gmail.com> wrote: > Are these two below the same thing? > > 1. module X > module Y > class Z > > > 2. class X::Y::Z >
Providing class Z has already been created with style 1, yes. If you try to run style 2 without X and Y having been created you will get "NameError: uninitialized constant X". The difference between class and module in Ruby is fairly minimal (and mainly used for inferring a difference in usage to the reader) Cheers, Andy -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.