Class: GraphWeaver::Codegen::Node
- Inherits:
-
Object
- Object
- GraphWeaver::Codegen::Node
show all
- Defined in:
- lib/graph_weaver/codegen/nodes.rb
Overview
Protocol defaults — subclasses override what differs. The full node
protocol: bare_type, prop_type, cast(expr, depth), identity?,
serialize(expr, depth), serialize_identity?, coerce?, coerce(expr),
coerce_input_type, hash_coerce(expr, depth), hash_coerce_identity?,
non_null?, nested.
Instance Method Summary
collapse
Instance Method Details
#bare_type ⇒ Object
16
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 16
def bare_type = raise(GraphWeaver::Error, "#{self.class} must define bare_type")
|
#coerce? ⇒ Boolean
20
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 20
def coerce? = false
|
#hash_coerce_identity? ⇒ Boolean
21
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 21
def hash_coerce_identity? = false
|
#identity? ⇒ Boolean
18
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 18
def identity? = false
|
#nested ⇒ Object
23
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 23
def nested = nil
|
#non_null? ⇒ Boolean
22
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 22
def non_null? = false
|
#prop_type ⇒ Object
17
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 17
def prop_type = "T.nilable(#{bare_type})"
|
#serialize_identity? ⇒ Boolean
19
|
# File 'lib/graph_weaver/codegen/nodes.rb', line 19
def serialize_identity? = false
|