From: pharrington Date: 2009-11-19T06:45:14+09:00 Subject: Re: Class inside a Method Body On Nov 18, 2:56 am, Mike Stephens wrote: > > Of course you can!  Why do you think you can't? > > > Exactly.  The required file can contain anything - from zero to multiple > > 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.