Sha256: 9929a54ca4cfe4620cf51628deaacc1fd494ea12714f37511e0c812ba5750a40

Contents?: true

Size: 460 Bytes

Versions: 20

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true
require "rails/generators/named_base"
require_relative "core"

module Graphql
  module Generators
    class FunctionGenerator < Rails::Generators::NamedBase
      include Core

      desc "Create a GraphQL::Function by name"
      source_root File.expand_path('../templates', __FILE__)

      def create_function_file
        template "function.erb", "#{options[:directory]}/functions/#{file_path}.rb"
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
graphql-1.8.1 lib/generators/graphql/function_generator.rb
graphql-1.8.0 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre11 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre10 lib/generators/graphql/function_generator.rb
graphql-1.7.14 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre9 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre8 lib/generators/graphql/function_generator.rb
graphql-1.7.13 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre7 lib/generators/graphql/function_generator.rb
graphql-1.7.12 lib/generators/graphql/function_generator.rb
graphql-1.7.11 lib/generators/graphql/function_generator.rb
graphql-1.7.10 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre6 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre5 lib/generators/graphql/function_generator.rb
graphql-1.7.9 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre4 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre3 lib/generators/graphql/function_generator.rb
graphql-1.7.8 lib/generators/graphql/function_generator.rb
graphql-1.8.0.pre2 lib/generators/graphql/function_generator.rb
graphql-1.7.7 lib/generators/graphql/function_generator.rb