title: Ruby Rails Lib Folder Naming Convention
body: <p>I seem to be having trouble with the naming conventions of the Lib Folder in Rails, and the error messages provided to me do not help. [For example, I have received a message saying that XXX::YYY::TextBox is expected to be defined xxx/yyy/text_box.rb, even though it clearly was defined there.] I think I'm getting the convention wrong.</p>
  
  <p>Let's say I am working on YourModule::MyModule::MyClass. I clearly get that this file should be located in</p>
  
  <p>lib/your_module/my_module/my_class.rb</p>
  
  <p>But what should the actual file here look like? Which one of these (if either) are correct?</p>
  
  <pre><code>#your_module/my_module/my_class.rb
  module YourModule
    module MyModule
      class MyClass
         ...
      end
    end
  end
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>#your_module/my_module/my_class.rb
  class MyClass
    ...
  end
  </code></pre>
  
  <p>In other words, do I need to nest the class inside of the module structure or not?</p>