Sha256: 9436b5a35f75c52bb70cdef4f0002775510e2bb30a871bfca8b1719b3cea1c1d

Contents?: true

Size: 405 Bytes

Versions: 28

Compression:

Stored size: 405 Bytes

Contents

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

module Graphql
  module Generators
    class FunctionGenerator < Rails::Generators::NamedBase
      desc "Create a GraphQL::Function by name"
      source_root File.expand_path('../templates', __FILE__)

      def create_function_file
        template "function.erb", "app/graphql/functions/#{file_name}.rb"
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
graphql-1.7.4 lib/generators/graphql/function_generator.rb
graphql-1.7.3 lib/generators/graphql/function_generator.rb
graphql-1.7.2 lib/generators/graphql/function_generator.rb
graphql-1.7.1 lib/generators/graphql/function_generator.rb
graphql-1.7.0 lib/generators/graphql/function_generator.rb
graphql-1.6.8 lib/generators/graphql/function_generator.rb
graphql-1.6.7 lib/generators/graphql/function_generator.rb
graphql-1.6.6 lib/generators/graphql/function_generator.rb
graphql-1.6.5 lib/generators/graphql/function_generator.rb
graphql-1.6.4 lib/generators/graphql/function_generator.rb
graphql-1.5.15 lib/generators/graphql/function_generator.rb
graphql-1.6.3 lib/generators/graphql/function_generator.rb
graphql-1.6.2 lib/generators/graphql/function_generator.rb
graphql-1.6.1 lib/generators/graphql/function_generator.rb
graphql-1.6.0 lib/generators/graphql/function_generator.rb
graphql-1.5.14 lib/generators/graphql/function_generator.rb
graphql-1.5.13 lib/generators/graphql/function_generator.rb
graphql-1.5.7.1 lib/generators/graphql/function_generator.rb
graphql-1.5.12 lib/generators/graphql/function_generator.rb
graphql-1.5.11 lib/generators/graphql/function_generator.rb