Class: ForgeryGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/forgery/forgery_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



6
7
8
# File 'lib/generators/forgery/forgery_generator.rb', line 6

def self.source_root
  @_forgery_source_root ||= File.expand_path(File.dirname(__FILE__))
end

Instance Method Details

#create_directoriesObject



10
11
12
13
14
15
16
17
# File 'lib/generators/forgery/forgery_generator.rb', line 10

def create_directories
  puts "Creating directories in /lib/forgery..."

  FileUtils.mkdir_p 'lib/forgery/dictionaries'
  FileUtils.mkdir_p 'lib/forgery/extensions'
  FileUtils.mkdir_p 'lib/forgery/forgeries'
  FileUtils.mkdir_p 'lib/forgery/formats'
end