Class: GraphQL::GraphQLList

Inherits:
Object
  • Object
show all
Includes:
GraphQLInputType, GraphQLNullableType, GraphQLOutputType, GraphQLType
Defined in:
lib/graphql/type/list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GraphQLNullableType

#!

Methods included from GraphQLType

#+@

Constructor Details

#initialize(of_type) ⇒ GraphQLList

Returns a new instance of GraphQLList.



12
13
14
15
# File 'lib/graphql/type/list.rb', line 12

def initialize(of_type)
  raise "Expecting #{GraphQLType}, got #{of_type.class}." unless of_type.is_a?(GraphQLType)
  @of_type = of_type
end

Instance Attribute Details

#of_typeObject (readonly)

Returns the value of attribute of_type.



10
11
12
# File 'lib/graphql/type/list.rb', line 10

def of_type
  @of_type
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/graphql/type/list.rb', line 17

def to_s
  '[' + of_type.to_s + ']'
end