Module: GraphQLSchema::NamedHash
- Included in:
- Directive, EnumValue, Field, InputValue, Type
- Defined in:
- lib/graphql_schema.rb
Instance Method Summary collapse
- #camelize_name ⇒ Object
- #classify_name ⇒ Object
- #description ⇒ Object
- #name ⇒ Object
- #to_h ⇒ Object
- #upcase_name ⇒ Object
Instance Method Details
#camelize_name ⇒ Object
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_name ⇒ Object
64 65 66 |
# File 'lib/graphql_schema.rb', line 64 def classify_name @classify_name ||= split_name.map(&:capitalize).join end |
#description ⇒ Object
72 73 74 |
# File 'lib/graphql_schema.rb', line 72 def description @hash.fetch('description') end |
#name ⇒ Object
52 53 54 |
# File 'lib/graphql_schema.rb', line 52 def name @hash.fetch('name') end |
#to_h ⇒ Object
76 77 78 |
# File 'lib/graphql_schema.rb', line 76 def to_h @hash end |
#upcase_name ⇒ Object
68 69 70 |
# File 'lib/graphql_schema.rb', line 68 def upcase_name @upcase_name ||= split_name.join("_").upcase end |