Sha256: 4637c803affc46381b2ec8e3d26b7a368e5b6bfd3e40e3af9d251d9234d9f68f

Contents?: true

Size: 322 Bytes

Versions: 2

Compression:

Stored size: 322 Bytes

Contents

module Pieces
  class Generator
    def init(config)
      FileUtils.mkdir_p(config[:path])

      Dir["#{example_path}/{config,layouts,pieces}"].each do |dir|
        FileUtils.cp_r(dir, config[:path])
      end
    end

    private

    def example_path
      File.dirname(__FILE__) + '/../../example'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pieces-0.2.1 lib/pieces/generator.rb
pieces-0.2.0 lib/pieces/generator.rb