class GraphQL::Language::Nodes::Directive
Attributes
arguments
[R]
Array[Argument]
children
[R]
Array[Argument]
Public Class Methods
# File lib/graphql/language/nodes.rb, line 403 def self.from_a(filename, line, col, name, arguments, comment: nil) self.new(filename: filename, line: line, col: col, name: name, arguments: arguments) end
(?name: untyped, ?arguments: Array[Argument], ?line: Integer?, ?col: Integer?, ?pos: Integer?, ?filename: String?, ?source: untyped) → void
Source
# File lib/graphql/language/nodes.rb, line 393 def initialize(name: nil, arguments: NO_CHILDREN, line: nil, col: nil, pos: nil, filename: nil, source: nil) @line = line @col = col @pos = pos @filename = filename @source = source @name = name @arguments = arguments.freeze end
Public Instance Methods
Source
# File lib/graphql/language/nodes.rb, line 407 def marshal_dump [ line, col, # use methods here to force them to be calculated @filename, @name, @arguments, ] end
Source
# File lib/graphql/language/nodes.rb, line 416 def marshal_load(values) @line, @col, @filename, @name, @arguments = values end
Source
# File lib/graphql/language/nodes.rb, line 386 def merge_argument(**node_opts) merge(arguments: arguments + [GraphQL::Language::Nodes::Argument.new(**node_opts)]) end
Source
# File lib/graphql/language/nodes.rb, line 379 def scalars @scalars ||= [@name].freeze end
Source
# File lib/graphql/language/nodes.rb, line 372 def visit_method :on_directive end