Module: Howl::Generator
- Defined in:
- lib/howl/generator.rb
Class Method Summary collapse
Class Method Details
.generate(directory) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/howl/generator.rb', line 5 def self.generate(directory) directory = File.(directory) if file_in_the_way?(directory) puts "#{directory} already exists and is not an empty directory." exit end FileUtils.mkdir_p(directory) FileUtils.cp_r(File.join(File.dirname(__FILE__), 'sample_site', '.'), directory) end |