Class: GraphQL::ScalarType
- Inherits:
-
ObjectType
- Object
- ObjectType
- GraphQL::ScalarType
- Defined in:
- lib/graphql/scalar_type.rb
Overview
The parent type for scalars, eg STRING_TYPE, INT_TYPE
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from ObjectType
#description, #fields, #interfaces
Instance Method Summary collapse
Methods inherited from ObjectType
Methods included from DefinitionHelpers::DefinedByConfig
Methods included from DefinitionHelpers::NonNullWithBang
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/graphql/scalar_type.rb', line 6 def name @name end |
Instance Method Details
#coerce(value) ⇒ Object
8 9 10 |
# File 'lib/graphql/scalar_type.rb', line 8 def coerce(value) @coerce_proc.call(value) end |
#coerce=(proc) ⇒ Object
12 13 14 |
# File 'lib/graphql/scalar_type.rb', line 12 def coerce=(proc) @coerce_proc = proc end |