Class: TinyGQL::Nodes::ObjectField
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(viz) ⇒ Object
- #children ⇒ Object
- #fold(viz, seed) ⇒ Object
-
#initialize(name, value) ⇒ ObjectField
constructor
A new instance of ObjectField.
- #object_field? ⇒ Boolean
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_type_definition?, #object_type_extension?, #object_value?, #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(name, value) ⇒ ObjectField
Returns a new instance of ObjectField.
275 276 277 278 |
# File 'lib/tinygql/nodes.rb', line 275 def initialize name, value @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
273 274 275 |
# File 'lib/tinygql/nodes.rb', line 273 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
273 274 275 |
# File 'lib/tinygql/nodes.rb', line 273 def value @value end |
Instance Method Details
#accept(viz) ⇒ Object
280 281 282 |
# File 'lib/tinygql/nodes.rb', line 280 def accept viz viz.handle_object_field self end |
#children ⇒ Object
290 291 292 |
# File 'lib/tinygql/nodes.rb', line 290 def children ary = []; ary << value; ary end |
#fold(viz, seed) ⇒ Object
284 285 286 |
# File 'lib/tinygql/nodes.rb', line 284 def fold viz, seed viz.handle_object_field self, seed end |
#object_field? ⇒ Boolean
288 |
# File 'lib/tinygql/nodes.rb', line 288 def object_field? = true |