title: ruby: how to load .rb file in the local context
body: <p>How this simple task can be done in Ruby?<br>
  I have some simple config file</p>
  
  <pre><code>=== config.rb
  config = { 'var' =&gt; 'val' }
  </code></pre>
  
  <p>I want to load config file from some method, defined in <code>main.rb</code> file so that the local variables from <code>config.rb</code> became local vars of that method.<br>
  Something like this:</p>
  
  <pre><code>=== main.rb
  Class App
      def loader
          load('config.rb') # or smth like that
          p config['var']   # =&gt; "val"
      end
  end
  </code></pre>
  
  <p>I know that i can use global vars in <code>config.rb</code> and then undefine them when done, but i hope there's a ruby way )</p>