Class: Rails::AppUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/app_updater.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.app_generatorObject



13
14
15
16
17
18
19
# File 'lib/rails/app_updater.rb', line 13

def app_generator
  @app_generator ||= begin
    gen = Rails::Generators::AppGenerator.new ["rails"], generator_options, destination_root: Rails.root
    gen.send(:valid_const?) unless File.exist?(Rails.root.join("config", "application.rb"))
    gen
  end
end

.invoke_from_app_generator(method) ⇒ Object



9
10
11
# File 'lib/rails/app_updater.rb', line 9

def invoke_from_app_generator(method)
  app_generator.send(method)
end