bashaus bashaus - 1 year ago 113
Ruby Question

Rake get directory name in file glob

If a Rake File exists with the following code:

file 'assets/*/map.a' => ['map.b', 'map.c'] do
# Code goes here...

I want to know what the name of the directory in the glob is (instead of the file). Any suggestions?

Answer Source
file 'assets/*/map.a' => ['map.b', 'map.c'] do |path|
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download