In ruby, I'm able to do
File.dirname("/home/gumby/bigproject/now_with_bugs_fixed/32/FOO_BAR_2096.results")
and get
"/home/gumby/bigproject/now_with_bugs_fixed/32"
but now I'd like to split up that directory string into the components, ie something like
["home", "gumby", "bigproject", "now_with_bugs_fixed", "32"]
Is there a way to do that other than using
directory_string.split("/")[1:-1]