Class: GraphQL::ScalarType
- Defined in:
- lib/graphql/scalar_type.rb
Overview
The parent type for scalars, eg STRING_TYPE, INT_TYPE
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Methods inherited from BaseType
#==, #resolve_type, #to_s, #unwrap
Methods included from DefinitionHelpers::DefinedByConfig
Methods included from DefinitionHelpers::NonNullWithBang
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/graphql/scalar_type.rb', line 6 def description @description end |
#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 |