Sha256: 47c0ba5a8238c896085162ff5ef49d944857bbf5464d546a1c22ce28ba5cfac2
Contents?: true
Size: 598 Bytes
Versions: 16
Compression:
Stored size: 598 Bytes
Contents
module Bonsai class Generate def initialize(path) @path = path Bonsai.log "Planting your bonsai '#{path}'" copy_templates create_directories end private def create_directories %w(content content/index public/css public/js).each do |dir| Bonsai.log "\tcreate\t#{dir}" FileUtils.mkdir_p(File.join(@path, dir)) end end def copy_templates # Using system call because fileutils is inadequate system("cp -fR '#{File.expand_path("#{File.dirname(__FILE__)}/templates")}' '#{@path}'") end end end
Version data entries
16 entries across 16 versions & 1 rubygems