I\'m pretty familiar with when to use subclasses and modules, but more recently I\'ve been seeing nested classes like this:
class Foo
class Bar
# do so
You probably want to use this to group your classes into a module. Sort of a namespace thing.
for example the Twitter gem uses namespaces to achieve this:
Twitter::Client.new
Twitter::Search.new
So both Client and Search classes live under the Twitter module.
If you want to check the sources, the code for both classes can be found here and here.
Hope this helps!