Class: TinyGQL::Nodes::Field
Instance Attribute Summary collapse
-
#aliaz ⇒ Object
readonly
Returns the value of attribute aliaz.
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#directives ⇒ Object
readonly
Returns the value of attribute directives.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#selection_set ⇒ Object
readonly
Returns the value of attribute selection_set.
Instance Method Summary collapse
- #accept(viz) ⇒ Object
- #children ⇒ Object
- #field? ⇒ Boolean
- #fold(viz, seed) ⇒ Object
-
#initialize(aliaz, name, arguments, directives, selection_set) ⇒ Field
constructor
A new instance of Field.
Methods inherited from Node
#argument?, #boolean_value?, #directive?, #directive_definition?, #document?, #each, #enum_type_definition?, #enum_value?, #enum_value_definition?, #executable_directive_location?, #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?, #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(aliaz, name, arguments, directives, selection_set) ⇒ Field
Returns a new instance of Field.
250 251 252 253 254 255 256 |
# File 'lib/tinygql/nodes.rb', line 250 def initialize aliaz, name, arguments, directives, selection_set @aliaz = aliaz @name = name @arguments = arguments @directives = directives @selection_set = selection_set end |
Instance Attribute Details
#aliaz ⇒ Object (readonly)
Returns the value of attribute aliaz.
248 249 250 |
# File 'lib/tinygql/nodes.rb', line 248 def aliaz @aliaz end |
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
248 249 250 |
# File 'lib/tinygql/nodes.rb', line 248 def arguments @arguments end |
#directives ⇒ Object (readonly)
Returns the value of attribute directives.
248 249 250 |
# File 'lib/tinygql/nodes.rb', line 248 def directives @directives end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
248 249 250 |
# File 'lib/tinygql/nodes.rb', line 248 def name @name end |
#selection_set ⇒ Object (readonly)
Returns the value of attribute selection_set.
248 249 250 |
# File 'lib/tinygql/nodes.rb', line 248 def selection_set @selection_set end |
Instance Method Details
#accept(viz) ⇒ Object
258 259 260 |
# File 'lib/tinygql/nodes.rb', line 258 def accept viz viz.handle_field self end |
#children ⇒ Object
268 269 270 |
# File 'lib/tinygql/nodes.rb', line 268 def children ary = []; ary.concat(arguments) if arguments; ary.concat(directives) if directives; ary.concat(selection_set) if selection_set; ary end |
#field? ⇒ Boolean
266 |
# File 'lib/tinygql/nodes.rb', line 266 def field? = true |
#fold(viz, seed) ⇒ Object
262 263 264 |
# File 'lib/tinygql/nodes.rb', line 262 def fold viz, seed viz.handle_field self, seed end |