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.6.6 gem_templates/generator.erb
gapic-generator-0.6.5 gem_templates/generator.erb
gapic-generator-0.6.4 gem_templates/generator.erb
gapic-generator-0.6.3 gem_templates/generator.erb
gapic-generator-0.6.2 gem_templates/generator.erb
gapic-generator-0.6.1 gem_templates/generator.erb
gapic-generator-0.6.0 gem_templates/generator.erb
gapic-generator-0.5.1 gem_templates/generator.erb
gapic-generator-0.5.0 gem_templates/generator.erb
gapic-generator-0.4.2 gem_templates/generator.erb
gapic-generator-0.4.0 gem_templates/generator.erb
gapic-generator-0.3.3 gem_templates/generator.erb
gapic-generator-0.3.1 gem_templates/generator.erb
gapic-generator-0.3.0 gem_templates/generator.erb
gapic-generator-0.2.3 gem_templates/generator.erb
gapic-generator-0.2.2 gem_templates/generator.erb
gapic-generator-0.2.0 gem_templates/generator.erb
gapic-generator-0.1.7 gem_templates/generator.erb
gapic-generator-0.1.5 gem_templates/generator.erb
gapic-generator-0.1.4 gem_templates/generator.erb