class GraphQL::Language::Nodes::ScalarTypeExtension
Attributes
children
[R]
Array[Directive]
directives
[R]
Array[Directive]
Public Class Methods
# File lib/graphql/language/nodes.rb, line 1430 def self.from_a(filename, line, col, name, directives, comment: nil) self.new(filename: filename, line: line, col: col, name: name, directives: directives) end
(?name: untyped, ?directives: Array[Directive], ?line: Integer?, ?col: Integer?, ?pos: Integer?, ?filename: String?, ?source: untyped) → void
Source
# File lib/graphql/language/nodes.rb, line 1420 def initialize(name: nil, directives: 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 end
Public Instance Methods
Source
# File lib/graphql/language/nodes.rb, line 1434 def marshal_dump [ line, col, # use methods here to force them to be calculated @filename, @name, @directives, ] end
Source
# File lib/graphql/language/nodes.rb, line 1443 def marshal_load(values) @line, @col, @filename, @name, @directives = values end
# File lib/graphql/language/nodes.rb, line 1413 def merge_directive(**node_opts) merge(directives: directives + [GraphQL::Language::Nodes::Directive.new(**node_opts)]) end
Source
# File lib/graphql/language/nodes.rb, line 1406 def scalars @scalars ||= [@name].freeze end
Source
# File lib/graphql/language/nodes.rb, line 1399 def visit_method :on_scalar_type_extension end