Sha256: 5f90771e87a16ebeafd9e85fc62860e0f10f4e016c87e3a47625a0b7485a38b7

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require 'thor'

module Pieces
  class Generator
    def self.init(config = {})
      new(config).init
    end

    def self.from_superclass(method, default)
      default
    end

    include Thor::Actions
    include Thor::Shell

    source_root File.expand_path('../../../examples/boilerplate', __FILE__)

    attr_reader :path, :options

    def initialize(config = {})
      @path = config[:path] || Dir.pwd
      @options = {}
      self.destination_root = config[:path]
    end

    def init
      directory 'app/assets/stylesheets'
      directory 'app/views'
      copy_file 'config/pieces.yml'
      copy_file 'Gemfile'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pieces-0.4.5 lib/pieces/generator.rb
pieces-0.4.4 lib/pieces/generator.rb
pieces-0.4.3 lib/pieces/generator.rb