Class: Rswag::Api::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_initializerObject



9
10
11
# File 'lib/generators/rswag/api/install/install_generator.rb', line 9

def add_initializer
  template('rswag_api.rb', 'config/initializers/rswag_api.rb')
end

#add_routesObject



13
14
15
# File 'lib/generators/rswag/api/install/install_generator.rb', line 13

def add_routes
  route("mount Rswag::Api::Engine => '/api-docs'")
end