class DependencySpy::Outputs::FileSystem
Public Class Methods
write(path, output)
click to toggle source
# File lib/dependency_spy/outputs/file.rb, line 21 def self.write(path, output) file = File.expand_path(path) path_directory = File.dirname(file) FileUtils.mkdir_p(path_directory) unless File.exist?(path_directory) File.open(file, 'wb') do |f| f.puts(output) end end