Sha256: 3fecdd82f8d85b3a8fff2d3fe574d9156018f187b38372c83ea75a5a26ddef4d

Contents?: true

Size: 308 Bytes

Versions: 12

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Types
    class BaseType < BaseObject
      class << self
        def graphql_name(name = "")
          return name if name.present?

          self.name.demodulize.gsub('Type', '').classify.constantize.table_name
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ibrain-core-0.5.15 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.13 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.12 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.10 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.9 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.8 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.7 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.6 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.5 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.4 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.3 app/graphql/ibrain/types/base_type.rb
ibrain-core-0.5.2 app/graphql/ibrain/types/base_type.rb