Sha256: efc6eeb0855ce7843958a41a1551a68869c2e237113a8317d8e4dea4518176e9

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

module ApiDoc
  module Generators
    class InstallGenerator < Rails::Generators::Base

      source_root File.dirname(__FILE__)

      desc "Copies locale files to your application and mounts the ApiDoc engine."
      
      def copy_locale
        copy_file File.join("templates", "en.yml"), "config/locales/api_doc.en.yml"
      end

      def add_api_doc_routes
        route 'mount ApiDoc::Engine => "/api_docs"'  
      end

      def copy_index
        copy_file File.join("templates", "index.html.erb"), "app/views/api_doc/documents/index.html.erb"
      end
      

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
api_doc-0.0.11 lib/generators/api_doc/install_generator.rb
api_doc-0.0.10 lib/generators/api_doc/install_generator.rb
api_doc-0.0.9 lib/generators/api_doc/install_generator.rb
api_doc-0.0.7 lib/generators/api_doc/install_generator.rb