Class: NetguruBootstrapper::Generator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/netguru_bootstrapper/generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



11
12
13
# File 'lib/netguru_bootstrapper/generator.rb', line 11

def self.source_root
  File.expand_path('../templates', __FILE__)
end

Instance Method Details

#create_directoriesObject



20
21
22
23
24
25
# File 'lib/netguru_bootstrapper/generator.rb', line 20

def create_directories
  structure.directories.each do |dir|
    empty_directory "#{options[:path]}/#{dir}"
    create_files(dir, structure.files[dir])
  end
end

#create_root_fileObject



15
16
17
18
# File 'lib/netguru_bootstrapper/generator.rb', line 15

def create_root_file
  say "Using #{options[:path]} as root directory", :blue
  template 'application.scss', "#{options[:path]}/application.scss"
end