title: Can I disallow a Rails model from being access outside of a module?
body: <p>Is there a way to have a model such that only code within the same module can access it?</p>
  
  <p>Something like:</p>
  
  <pre><code>module SomeModule
    class SomeActiveRecordModel
      # has attribute `some_attribute`
      ...
    end
  end
  
  module SomeModule
    class SomeOtherClass
      def self.sum_of_attribute
        SomeActiveRecordModel.sum(:some_attribute)
      end
    end
  end
  
  class OutsideOfModule
    def self.sum_of_attribute
      SomeModule::SomeActiveRecordModel.sum(:some_attribute)
    end
  end
  
  SomeModule::SomeOtherClass.sum_of_attribute # works
  OutsideOfModule.sum_of_attribute # raises error
  </code></pre>