Class: TryApi::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_config_fileObject



13
14
15
# File 'lib/generators/try_api/install_generator.rb', line 13

def create_config_file
  directory 'try_api', 'config/try_api'
end

#init_environmentObject



8
9
10
11
# File 'lib/generators/try_api/install_generator.rb', line 8

def init_environment
  app = ::Rails.application
  @app_name = app.class.to_s.split("::").first
end