title: Return anonymous object from a method in ruby
body: <p>How can I return an anonymous object from a method in ruby.? </p>
  
  <p>In the following code, I am returning an hash.</p>
  
  <pre><code>  def process
      source = helper
  
      # I am able to get the value as an hash
      puts source[:url]
      puts source[:params]
  
      # But I wonder if there is a way to get it as an object, so that I can use the dot notation
      # puts source.url
      # puts source.params
    end
  
    def helper
      url = ''
      params = ''
      return {url: url, params: params}
    end
  </code></pre>
  
  <p>Any thoughts.?</p>