Sha256: 89cbed290f11f35ea087db97c79851fde1704be28f8223de557347c5c7a1503c

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

module Documentation
  module Generators
    class ReadmeGenerator < Rails::Generators::Base
      source_root File.expand_path("templates", __dir__)

      class_option :directory, type: :string, default: ".api"

      def copy_files
        template "README.md", "#{options.directory}/README.md"
      end

      private
        def application_name
          if defined?(Rails) && Rails.application
            Rails.application.class.name.split("::").first.underscore
          else
            "application"
          end
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
documentation-zero-0.0.13 lib/generators/documentation/readme/readme_generator.rb
documentation-zero-0.0.12 lib/generators/documentation/readme/readme_generator.rb