Module: GraphQLSchema::NamedHash

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

Instance Method Summary collapse

Instance Method Details

#camelize_nameObject



56
57
58
59
60
61
62
# File 'lib/graphql_schema.rb', line 56

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

#classify_nameObject



64
65
66
# File 'lib/graphql_schema.rb', line 64

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

#descriptionObject



72
73
74
# File 'lib/graphql_schema.rb', line 72

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

#nameObject



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

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

#to_hObject



76
77
78
# File 'lib/graphql_schema.rb', line 76

def to_h
  @hash
end

#upcase_nameObject



68
69
70
# File 'lib/graphql_schema.rb', line 68

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