Class: Capgem::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/capgem/utils.rb

Class Method Summary collapse

Class Method Details

.create_directoriesObject

Create the required directories (bin and log) and put a README in the log directory



5
6
7
8
9
10
11
# File 'lib/capgem/utils.rb', line 5

def self.create_directories
  mkdir 'bin' unless File.exists?('bin')
  mkdir 'log' unless File.exists?('log')
  File.open('log/README') do |f|
    puts "Log files will go here"
  end
end