D
dave
ddir = ENV['DOCUMENT_ROOT'] + '/data'
Find.find(ddir){|f|
if (f =~ /.yml$/) # has yml extention
eval "#{File.basename(f.delete('.yml'))} = YAML.load(File.new(f))"
else
next
end
}
I serched on ruby-talk but i did not find any solution.
How this code can be written (or re-written)?
tnx.
--
Find.find(ddir){|f|
if (f =~ /.yml$/) # has yml extention
eval "#{File.basename(f.delete('.yml'))} = YAML.load(File.new(f))"
else
next
end
}
I serched on ruby-talk but i did not find any solution.
How this code can be written (or re-written)?
tnx.
--
horatio, than are dreamt of in your philosophy.here are more things in heaven and earth,