title: Get Ruby pure class name without parent name, any direct method for it?
body: <p>I often need to get the pure class name of an object, as code below:</p>
  
  <pre><code>class Foo
      class Bar
  
      end
  end
  obj = Foo::Bar.new
  puts obj.class.name  # It shows "Foo::Bar", while what I want is just "Bar"
  </code></pre>
  
  <p>I know it can be done by obj.class.name.split('::').last, but, shouldn't be there a method just return "Bar" ?</p>