Class: Rsg::Generators::App::AppGenerator

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Includes:
Rsg::Generators::Actions
Defined in:
lib/rsg/generators/app/app_generator.rb

Overview

AppGenerator is the entrypoint for generation of new apps which builds on top of the core ‘rails new` command

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Rsg::Generators::Actions

#api_mode?, #append_gem, #confirm?, #enable_railtie, #git_add_commit, #rsg_apply, #rsg_apply_default!, #rsg_generate, #rsg_install, #rsg_options, #rsg_skip_or_confirm, #rsg_state

Class Method Details



51
52
53
# File 'lib/rsg/generators/app/app_generator.rb', line 51

def self.banner
  "rsg #{arguments.map(&:usage).join(" ")} [options]"
end

.source_pathsObject



55
56
57
58
59
60
# File 'lib/rsg/generators/app/app_generator.rb', line 55

def self.source_paths
  @__source_paths ||= [
    ::Rails::Generators::AppGenerator.source_root,
    Pathname.new(__FILE__).dirname.join("templates").expand_path
  ]
end

Instance Method Details

#set_default_accessors!Object



62
63
64
65
66
# File 'lib/rsg/generators/app/app_generator.rb', line 62

def set_default_accessors!
  bundled_template = Rsg.lookup_app_template(options[:template])
  super
  self.rails_template = bundled_template if bundled_template
end