title: Ruby object added to meta class is not visible
body: <p>I have been trying to get the hang of metaprogramming in ruby by reading other people's code on the same. I have this piece of code that is probably too cryptic for me to debug. Here is the code.</p>
  
  <pre><code>#!/usr/bin/env ruby
  
  class Person
  
    def print_name
      p "#{Person.identity.name}"
    end
  
    class &lt;&lt; self
      attr_accessor :identity
  
      def identify()
        self.identity ||= Identity.new
        yield(identity)
      end
    end
  
    class Identity
      attr_accessor :name
  
      def initialize
        @name = "kibet"
      end
    end
  end
  
  me = Person.new
  me.print_name
  </code></pre>
  
  <p>And the error I'm getting is this</p>
  
  <pre><code>`print_name': undefined method `name' for nil:NilClass (NoMethodError)
      from ./meta_config.rb:28
  </code></pre>
  
  <p>Help's highly appreciated.</p>