On Nov 18, 2:56    ⮮ 
> > Of course you can!    
>
> > Exactly.         
> > classes.
>
> If I put a class inside a method I get an error, so I assumed if I
> insert code with the word 'class' in it, the same would happen.
>
> --
> Posted viahttp://www.ruby-forum.com/.


Because

def asdf; class Edgar; end; end

is a syntax error is all; of course nothing in Ruby is stopping you
from creating a new class within a method call. If you really want or
need to is a different question entirely.