Class: GraphQL::Language::Nodes::Argument

Inherits:
AbstractNode show all
Defined in:
lib/graphql/language/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

child_attributes, #initialize, #position, #to_query_string

Constructor Details

This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode

Instance Attribute Details

#nameObject

Returns the value of attribute name.



75
76
77
# File 'lib/graphql/language/nodes.rb', line 75

def name
  @name
end

#valueObject

Returns the value of attribute value.



75
76
77
# File 'lib/graphql/language/nodes.rb', line 75

def value
  @value
end

Instance Method Details

#childrenObject



82
83
84
# File 'lib/graphql/language/nodes.rb', line 82

def children
  [value].flatten.select { |v| v.is_a?(AbstractNode) }
end

#initialize_node(name: nil, value: nil) ⇒ Object



77
78
79
80
# File 'lib/graphql/language/nodes.rb', line 77

def initialize_node(name: nil, value: nil)
  @name = name
  @value = value
end