Class: Ramix::AppGenerator

Inherits:
Thor::Group
  • Object
show all
Defined in:
lib/ramix/app_generator.rb

Constant Summary collapse

@@templates =
{}

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, opts, config) ⇒ AppGenerator

Returns a new instance of AppGenerator.

Raises:

  • (Thor::Error)


34
35
36
37
38
39
40
# File 'lib/ramix/app_generator.rb', line 34

def initialize(args, opts, config)
  raise Thor::Error, "Application path should be given. For details run: ramix --help" if args[0].blank?
  super
  add_template_option opts, options
  # Invoke the rails application generator
  invoke Rails::Generators::AppGenerator
end

Class Method Details

.class_options_help(shell, groups = {}) ⇒ Object

Overwrite class options help. Merge class options form rails



29
30
31
32
# File 'lib/ramix/app_generator.rb', line 29

def self.class_options_help(shell, groups={})
  Rails::Generators::AppGenerator.class_options_help( Thor::Shell::Basic.new )
  super(Thor::Shell::Basic.new, groups) #TODO - use color shell
end