Sha256: 312e3f2ac52f5ca417e562dc40aba77c28ecf8a92686263c6072ec950f0612de
Contents?: true
Size: 598 Bytes
Versions: 5
Compression:
Stored size: 598 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.expand_gem_path('scaffold') end end end
Version data entries
5 entries across 5 versions & 1 rubygems