title: Creating multiple connectors via models in their own namespace?
body: <p>I have an application written in PHP using the ZendFramework, containing a library of "Connections", for example, MySQL, CSV, Twitter etc. </p>
  
  <p>If a user signs up, they can connect to any data sources, say they pick a MySQL connector and a Twitter connector. </p>
  
  <p>Based on the details they have entered in my UI, I would then  connect to those datasources and retrieve the data they asked for. </p>
  
  <p>I was hoping to set this up in Ruby on Rails but I'm not sure how. Basically what I want is:</p>
  
  <pre><code>@twitter_connection = Twitter.somefunction 
  @mysql_connection = Mysql.somefunction
  </code></pre>
  
  <p>The Twitter and MySQL models above would be in their own namespace. I called it "Connections" in my app. Can I have a namespace like that in Rails and store all the connection models in the <code>/app/connections</code> folder, so it would be:</p>
  
  <pre><code>/app/connections/mysql.rb
  /app/connections/twitter.rb
  </code></pre>
  
  <p>Then, in those models, I would make the appropriate connection, whether it would be to MySQL, or an API like Twitter. Either way, the model would make the connection to the source and return whatever data I need. </p>
  
  <p>Is that possible? </p>
  
  <p>//Edit from comments</p>
  
  <p>I have a class under '/app/connection/classname.rb'</p>
  
  <p>The file contents are:</p>
  
  <pre><code>class Classname
     def function
     end
  end
  </code></pre>
  
  <p>How do I access this class in a controller. </p>
  
  <p><code>@variable = Classname.function</code> doesn't work.</p>