Sha256: 627a1b6719bf5502db1eb974fe739a19c6d07ab8b1617b3cc3f638233182e8c8
Contents?: true
Size: 608 Bytes
Versions: 6
Compression:
Stored size: 608 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/docs/css public/docs/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
6 entries across 6 versions & 1 rubygems