Module: GraphQLSchema::NamedHash

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

Instance Method Summary collapse

Instance Method Details

#camelize_nameObject



36
37
38
39
40
41
42
# File 'lib/graphql_schema.rb', line 36

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

#classify_nameObject



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

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

#descriptionObject



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

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

#nameObject



32
33
34
# File 'lib/graphql_schema.rb', line 32

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

#to_hObject



56
57
58
# File 'lib/graphql_schema.rb', line 56

def to_h
  @hash
end

#upcase_nameObject



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

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