DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Use File.basename To Return Just The Filename
File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb"
Resources: - <a href="http://snippets.dzone.com/posts/show/7317">Return the filename from a file path</a> [dzone.com]