title: How to get only class name without namespace
body: <p>There is a class like this.</p>
  
  <pre><code>module Foo
    class Bar
    end
  end
  </code></pre>
  
  <p>And I want to get the class name of <code>Bar</code> without <code>Foo</code>.</p>
  
  <pre><code>bar = Foo::Bar.new
  bar.class.to_s.match('::(.+)$'){ $1 }
  </code></pre>
  
  <p>I could get the class name by this code, but I don't think this is a best way to get it.</p>
  
  <p>Is there better way to get the name of class without namespace?</p>