Sha256: cc0d60ed77cbf96d12645daadb7d97f3c4a7c4c7e0750eb46d85d74d4ec5e291
Contents?: true
Size: 590 Bytes
Versions: 10
Compression:
Stored size: 590 Bytes
Contents
module Octopress class Scaffold attr_reader :path, :force def initialize(args, options) @path = File.expand_path(args.join(" "), Dir.pwd) @force = !!options['force'] end def write if !force && (File.exist?(path + '/_templates') || File.exist?(path + '/_octopress.yml')) abort "Some files already exist. Use --force to overwrite." end FileUtils.cp_r scaffold_path + '/.', path puts "Octopress scaffold added to #{path}." end def scaffold_path Octopress.gem_dir('scaffold') end end end
Version data entries
10 entries across 10 versions & 1 rubygems