class GraphQL::Language::Nodes::EnumTypeExtension
Attributes
directives
[R]
Array[Directive]
values
[R]
Array[EnumValueDefinition]
Public Class Methods
# File lib/graphql/language/nodes.rb, line 2294 def self.from_a(filename, line, col, name, directives, values, comment: nil) self.new(filename: filename, line: line, col: col, name: name, directives: directives, values: values) end
(?name: untyped, ?directives: Array[Directive], ?values: Array[EnumValueDefinition], ?line: Integer?, ?col: Integer?, ?pos: Integer?, ?filename: String?, ?source: untyped) → void
Source
# File lib/graphql/language/nodes.rb, line 2283 def initialize(name: nil, directives: NO_CHILDREN, values: NO_CHILDREN, line: nil, col: nil, pos: nil, filename: nil, source: nil) @line = line @col = col @pos = pos @filename = filename @source = source @name = name @directives = directives.freeze @values = values.freeze end
Public Instance Methods
Source
# File lib/graphql/language/nodes.rb, line 2268 def children @children ||= begin if !@directives.empty? || !@values.empty? new_children = [] new_children.concat(@directives) new_children.concat(@values) new_children.freeze new_children else NO_CHILDREN end end end
Source
# File lib/graphql/language/nodes.rb, line 2298 def marshal_dump [ line, col, # use methods here to force them to be calculated @filename, @name, @directives, @values, ] end
Source
# File lib/graphql/language/nodes.rb, line 2308 def marshal_load(values) @line, @col, @filename, @name, @directives, @values = values end
# File lib/graphql/language/nodes.rb, line 2260 def merge_directive(**node_opts) merge(directives: directives + [GraphQL::Language::Nodes::Directive.new(**node_opts)]) end
Source
# File lib/graphql/language/nodes.rb, line 2264 def merge_value(**node_opts) merge(values: values + [GraphQL::Language::Nodes::EnumValueDefinition.new(**node_opts)]) end
Source
# File lib/graphql/language/nodes.rb, line 2251 def scalars @scalars ||= [@name].freeze end
Source
# File lib/graphql/language/nodes.rb, line 2244 def visit_method :on_enum_type_extension end