Module: GraphQLSchema::NamedHash

Included in:
EnumValue, Field, InputValue, Type
Defined in:
lib/graphql_schema.rb

Instance Method Summary collapse

Instance Method Details

#camelize_nameObject



32
33
34
35
36
37
38
# File 'lib/graphql_schema.rb', line 32

def camelize_name
  @camelize_name ||= begin
    words = split_name.map(&:capitalize)
    words[0] = words[0].downcase
    words.join
  end
end

#classify_nameObject



40
41
42
# File 'lib/graphql_schema.rb', line 40

def classify_name
  @classify_name ||= split_name.map(&:capitalize).join
end

#descriptionObject



48
49
50
# File 'lib/graphql_schema.rb', line 48

def description
  @hash.fetch('description')
end

#nameObject



28
29
30
# File 'lib/graphql_schema.rb', line 28

def name
  @hash.fetch('name')
end

#to_hObject



52
53
54
# File 'lib/graphql_schema.rb', line 52

def to_h
  @hash
end

#upcase_nameObject



44
45
46
# File 'lib/graphql_schema.rb', line 44

def upcase_name
  @upcase_name ||= split_name.join("_").upcase
end