Class: GraphQL::Language::Nodes::FragmentDefinition
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::FragmentDefinition
- Defined in:
- lib/graphql/language/nodes.rb
Overview
A reusable fragment, defined at document-level.
Constant Summary
Constants inherited from AbstractNode
Instance Attribute Summary
Attributes inherited from AbstractNode
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name: nil, type: nil, directives: NONE, selections: NONE, filename: nil, pos: nil, source: nil, line: nil, col: nil) ⇒ FragmentDefinition
constructor
A new instance of FragmentDefinition.
-
#marshal_dump ⇒ Object
-
#marshal_load(values) ⇒ Object
Methods inherited from AbstractNode
#==, #children, #children_method_name, children_of_type, #col, #definition_line, #delete_child, inherited, #initialize_copy, #line, #merge, #position, #replace_child, #scalars, #to_query_string
Constructor Details
#initialize(name: nil, type: nil, directives: NONE, selections: NONE, filename: nil, pos: nil, source: nil, line: nil, col: nil) ⇒ FragmentDefinition
Returns a new instance of FragmentDefinition.
444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/graphql/language/nodes.rb', line 444 def initialize(name: nil, type: nil, directives: NONE, selections: NONE, filename: nil, pos: nil, source: nil, line: nil, col: nil) @name = name @type = type @directives = directives @selections = selections @filename = filename @pos = pos @source = source @line = line @col = col end |
Class Method Details
.from_a(filename, line, col, name, type, directives, selections) ⇒ Object
456 457 458 |
# File 'lib/graphql/language/nodes.rb', line 456 def self.from_a(filename, line, col, name, type, directives, selections) self.new(filename: filename, line: line, col: col, name: name, type: type, directives: directives, selections: selections) end |
Instance Method Details
#marshal_dump ⇒ Object
460 461 462 |
# File 'lib/graphql/language/nodes.rb', line 460 def marshal_dump [line, col, @filename, @name, @type, @directives, @selections] end |
#marshal_load(values) ⇒ Object
464 465 466 |
# File 'lib/graphql/language/nodes.rb', line 464 def marshal_load(values) @line, @col, @filename, @name, @type, @directives, @selections = values end |