title: Ruby passing hash to class variable
body: <p>I'm not understanding how to pass a hash to a class then access it from a class method. When the hash is displayed it is nil. If I try to iterate through it using .each I get a 'nil:nilClass' error. What am I missing here?</p>
  
  <p>Is this not possible or am I approaching it wrong?</p>
  
  <pre><code>#bin file
  @my_hash = YAML.load_file(@filename)
  @tester = TestClass.new(@my_hash)
  @tester.show
  
  #lib file
  class TestClass
   attr_accessor :my_hash
  
   def initialize(my_hash={})
     @my_hash
   end
  
   def show
     puts @my_hash.inspect
   end
  end
  </code></pre>