Class: GraphQL::GraphQLList
- Inherits:
-
Object
- Object
- GraphQL::GraphQLList
- Includes:
- GraphQLInputType, GraphQLNullableType, GraphQLOutputType, GraphQLType
- Defined in:
- lib/graphql/type/list.rb
Instance Attribute Summary collapse
-
#of_type ⇒ Object
readonly
Returns the value of attribute of_type.
Instance Method Summary collapse
-
#initialize(of_type) ⇒ GraphQLList
constructor
A new instance of GraphQLList.
- #to_s ⇒ Object
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_type ⇒ Object (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_s ⇒ Object
17 18 19 |
# File 'lib/graphql/type/list.rb', line 17 def to_s '[' + of_type.to_s + ']' end |