Class: Ibrain::Types::BaseType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/ibrain/types/base_type.rb

Class Method Summary collapse

Methods inherited from BaseObject

#graphql_name

Class Method Details

.graphql_name(name = "") ⇒ Object



7
8
9
10
11
# File 'app/graphql/ibrain/types/base_type.rb', line 7

def graphql_name(name = "")
  return name if name.present?

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