Sha256: b995622e15a05ee34de14ae0b17c3068d1078393e114e177fce1848be714e418

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module Spinebox
  class Generator
    
    attr_reader :root
    
    # Creates a new app and copies the templates to the newly created directory
    def initialize app
      @app = app
      create_app_directory
      copy_templates
    end
    
    private
    def create_app_directory
      FileUtils.mkdir @app
      @root = File.realdirpath @app
    end
    
    def copy_templates
      FileUtils.cp_r "#{Spinebox.root}/templates/.", @root
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spinebox-0.0.5 lib/spinebox/generator.rb
spinebox-0.0.4 lib/spinebox/generator.rb
spinebox-0.0.3 lib/spinebox/generator.rb
spinebox-0.0.2 lib/spinebox/generator.rb
spinebox-0.0.1 lib/spinebox/generator.rb