Sha256: c6131a136d086acbe2ff9fb3686fa326399f6ed731c9c183b1c9a5d383945c20

Contents?: true

Size: 1.06 KB

Versions: 44

Compression:

Stored size: 1.06 KB

Contents

<%= render partial: "shared/header" -%>


require "gapic/generators/default_generator"

module Gapic
  module Generators
    # The generator orchestrates the rendering of templates for
    # <%= gem_class_prefix %> projects.
    class <%= gem_class_prefix %>Generator < DefaultGenerator
      # Initializes the generator.
      #
      # @param api [Gapic::Schema::Api] The API model/context to
      #   generate.
      def initialize api
        super

        # Configure to use prefer <%= gem_class_prefix %> templates
        template_path = File.join __dir__,
                                  "../../../templates/<%= gem_name %>"
        use_templates! template_path

        # Configure these helper method to be used by the generator
        # use_helpers! :helper_method1, :helper_method2, :helper_method3
      end

      # Generates all the files for the API.
      #
      # @return [Array<
      #   Google::Protobuf::Compiler::CodeGeneratorResponse::File>]
      #   The files that were generated for the API.
      def generate
        super
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
gapic-generator-0.11.0 gem_templates/generator.erb
gapic-generator-0.10.1 gem_templates/generator.erb
gapic-generator-0.10.0 gem_templates/generator.erb
gapic-generator-0.9.1 gem_templates/generator.erb
gapic-generator-0.9.0 gem_templates/generator.erb
gapic-generator-0.8.0 gem_templates/generator.erb
gapic-generator-0.7.5 gem_templates/generator.erb
gapic-generator-0.7.4 gem_templates/generator.erb
gapic-generator-0.7.2 gem_templates/generator.erb
gapic-generator-0.7.1 gem_templates/generator.erb
gapic-generator-0.7.0 gem_templates/generator.erb
gapic-generator-0.6.15 gem_templates/generator.erb
gapic-generator-0.6.14 gem_templates/generator.erb
gapic-generator-0.6.13 gem_templates/generator.erb
gapic-generator-0.6.12 gem_templates/generator.erb
gapic-generator-0.6.11 gem_templates/generator.erb
gapic-generator-0.6.10 gem_templates/generator.erb
gapic-generator-0.6.9 gem_templates/generator.erb
gapic-generator-0.6.8 gem_templates/generator.erb
gapic-generator-0.6.7 gem_templates/generator.erb