Class: Rails::Archer::AppGenerator

Inherits:
Generators::AppGenerator
  • Object
show all
Defined in:
lib/rails-archer/generators/app/app_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AppGenerator



33
34
35
36
37
38
39
40
41
# File 'lib/rails-archer/generators/app/app_generator.rb', line 33

def initialize(*args)
  if args[0].blank?
    raise Rails::Generators::Error, "      Options should be given after the application name.\n      For details run: shoot --help\n    NOTICE\n  end\n  super\nend\n".strip_heredoc

Class Method Details

.default_source_rootObject



9
10
11
12
# File 'lib/rails-archer/generators/app/app_generator.rb', line 9

def default_source_root
  path = File.join default_generator_root, 'templates'
  path if File.exists? path
end