lib/fdoc/endpoint_scaffold.rb in fdoc-0.3.2 vs lib/fdoc/endpoint_scaffold.rb in fdoc-0.3.3
- old
+ new
@@ -15,10 +15,10 @@
end
end
def persist!
dirname = File.dirname(@endpoint_path)
- Dir.mkdir(dirname) unless File.directory?(dirname)
+ FileUtils.mkdir_p(dirname) unless File.directory?(dirname)
File.open(@endpoint_path, "w") do |file|
YAML.dump(@schema, file)
end
end