require "fileutils" require "eighty/version" require "eighty/metadata" require "eighty/source" module Eighty class Error < StandardError; end def self.build(target) target = File.expand_path(target) Eighty.metadata.items.each do |item| filename = File.join(target, item.path) dirname = File.dirname(filename) unless File.directory?(dirname) FileUtils.mkdir_p(dirname) end file = File.new(filename, "w") file.write(item.content) file.close end end end