title: Automatically Map JSON Objects into Instance Variables in Ruby
body: <p>I would like to be able to automatically parse JSON objects into instance variables. For example, with this JSON.</p>
  
  <pre><code>require 'httparty'
  
  json = HTTParty.get('http://api.dribbble.com/players/simplebits') #=&gt; {"shots_count":150,"twitter_screen_name":"simplebits","avatar_url":"http://dribbble.com/system/users/1/avatars/thumb/dancederholm-peek.jpg?1261060245","name":"Dan Cederholm","created_at":"2009/07/07 21:51:22 -0400","location":"Salem, MA","following_count":391,"url":"http://dribbble.com/players/simplebits","draftees_count":104,"id":1,"drafted_by_player_id":null,"followers_count":2214}
  </code></pre>
  
  <p>I'd like to be able to do this:</p>
  
  <pre><code>json.shots_count
  </code></pre>
  
  <p>And have it output:</p>
  
  <pre><code>150
  </code></pre>
  
  <p>How could I possibly do this?</p>