Class: TinyGQL::Nodes::ObjectValue

Inherits:
Node
  • Object
show all
Defined in:
lib/tinygql/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#argument?, #boolean_value?, #directive?, #directive_definition?, #document?, #each, #enum_type_definition?, #enum_value?, #enum_value_definition?, #executable_directive_location?, #field?, #field_definition?, #float_value?, #fragment_definition?, #fragment_spread?, #inline_fragment?, #input_object_type_definition?, #input_value_definition?, #int_value?, #interface_type_definition?, #list_type?, #list_value?, #named_type?, #not_null_type?, #null_value?, #object_field?, #object_type_definition?, #object_type_extension?, #operation_definition?, #root_operation_type_definition?, #scalar_type_definition?, #schema_definition?, #string_value?, #type_condition?, #type_system_directive_location?, #union_type_definition?, #value?, #variable?, #variable_definition?

Constructor Details

#initialize(values) ⇒ ObjectValue

Returns a new instance of ObjectValue.



388
389
390
# File 'lib/tinygql/nodes.rb', line 388

def initialize values
  @values = values
end

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values.



386
387
388
# File 'lib/tinygql/nodes.rb', line 386

def values
  @values
end

Instance Method Details

#accept(viz) ⇒ Object



392
393
394
# File 'lib/tinygql/nodes.rb', line 392

def accept viz
  viz.handle_object_value self
end

#childrenObject



402
403
404
# File 'lib/tinygql/nodes.rb', line 402

def children
  ary = []; ary.concat(values); ary
end

#fold(viz, seed) ⇒ Object



396
397
398
# File 'lib/tinygql/nodes.rb', line 396

def fold viz, seed
  viz.handle_object_value self, seed
end

#object_value?Boolean

Returns:

  • (Boolean)


400
# File 'lib/tinygql/nodes.rb', line 400

def object_value? = true