Sha256: cdfc7aa3f3e59336ea8162c68e3fb51840b74c5a982b8ab56125457fd0a968ea
Contents?: true
Size: 464 Bytes
Versions: 2
Compression:
Stored size: 464 Bytes
Contents
module Kharites::SetupMixin def generate Dir.mkdir(@base_dir) unless File.exists?(@base_dir) Dir[File.join(File.dirname(__FILE__), "..", "templates", "article", "*")].each do |template| begin FileUtils.cp_r(template, @base_dir) rescue Errno::EEXIST end end FileUtils.cd(@base_dir) {|dir| FileUtils.mv("article.kharites", "#{dir}.kharites") unless "#{dir}.kharites" == "article.kharites"} puts "Done" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Kharites-tools-0.1.1 | lib/kharites/mixins/generate.rb |
Kharites-tools-0.1.0 | lib/kharites/mixins/generate.rb |