Sha256: 5b2f6915ceaee409d0ff23a8bd0b37ca4b85c7711d2edf3cc3fefc6b26177dae
Contents?: true
Size: 444 Bytes
Versions: 1
Compression:
Stored size: 444 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.yml", "#{dir}.yml") unless "#{dir}.yml" == "article.yml"} puts "Done" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Kharites-tools-0.2.0 | lib/kharites/mixins/generate.rb |