Sha256: 2cfcbf58488a28bc705321ab553388e0a368fcd46d47f55238c4812e7bd8468d

Contents?: true

Size: 460 Bytes

Versions: 3

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_name}.rb"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
graphql-1.8.0.pre1 lib/generators/graphql/function_generator.rb
graphql-1.7.6 lib/generators/graphql/function_generator.rb
graphql-1.7.5 lib/generators/graphql/function_generator.rb