Class: TinyGQL::Nodes::InterfaceTypeExtension

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

Instance Attribute Summary collapse

Attributes inherited from Node

#start

Instance Method Summary collapse

Methods inherited from Node

#argument?, #boolean_value?, #directive?, #directive_definition?, #document?, #each, #enum_type_definition?, #enum_type_extension?, #enum_value?, #enum_value_definition?, #executable_directive_location?, #field?, #field_definition?, #float_value?, #fragment_definition?, #fragment_spread?, #inline_fragment?, #input_object_type_definition?, #input_object_type_extension?, #input_value_definition?, #int_value?, #interface_type_definition?, #line, #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?, #scalar_type_extension?, #schema_definition?, #string_value?, #type_condition?, #type_system_directive_location?, #union_type_definition?, #union_type_extension?, #value?, #variable?, #variable_definition?

Constructor Details

#initialize(pos, name, implements_interfaces, directives, fields_definition) ⇒ InterfaceTypeExtension

Returns a new instance of InterfaceTypeExtension.



945
946
947
948
949
950
951
# File 'lib/tinygql/nodes.rb', line 945

def initialize pos, name, implements_interfaces, directives, fields_definition
  super(pos)
  @name = name
  @implements_interfaces = implements_interfaces
  @directives = directives
  @fields_definition = fields_definition
end

Instance Attribute Details

#directivesObject (readonly)

Returns the value of attribute directives.



943
944
945
# File 'lib/tinygql/nodes.rb', line 943

def directives
  @directives
end

#fields_definitionObject (readonly)

Returns the value of attribute fields_definition.



943
944
945
# File 'lib/tinygql/nodes.rb', line 943

def fields_definition
  @fields_definition
end

#implements_interfacesObject (readonly)

Returns the value of attribute implements_interfaces.



943
944
945
# File 'lib/tinygql/nodes.rb', line 943

def implements_interfaces
  @implements_interfaces
end

#nameObject (readonly)

Returns the value of attribute name.



943
944
945
# File 'lib/tinygql/nodes.rb', line 943

def name
  @name
end

Instance Method Details

#accept(viz) ⇒ Object



953
954
955
# File 'lib/tinygql/nodes.rb', line 953

def accept viz
  viz.handle_interface_type_extension self
end

#childrenObject



963
964
965
# File 'lib/tinygql/nodes.rb', line 963

def children
  ary = []; ary.concat(implements_interfaces) if implements_interfaces; ary.concat(directives) if directives; ary.concat(fields_definition) if fields_definition; ary
end

#fold(viz, seed) ⇒ Object



957
958
959
# File 'lib/tinygql/nodes.rb', line 957

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

#interface_type_extension?Boolean

Returns:

  • (Boolean)


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

def interface_type_extension?; true; end