Class: GraphQL::Language::Nodes::ListLiteral

Inherits:
AbstractNode
  • Object
show all
Defined in:
lib/graphql/libgraphqlparser/monkey_patches/abstract_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeListLiteral

Returns a new instance of ListLiteral.



28
29
30
# File 'lib/graphql/libgraphqlparser/monkey_patches/abstract_node.rb', line 28

def initialize
  @values = []
end

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values.



26
27
28
# File 'lib/graphql/libgraphqlparser/monkey_patches/abstract_node.rb', line 26

def values
  @values
end

Instance Method Details

#value=(new_value) ⇒ Object

This makes it behave like Argument, while it's on the stack it can gobble up values



34
35
36
# File 'lib/graphql/libgraphqlparser/monkey_patches/abstract_node.rb', line 34

def value=(new_value)
  values << new_value
end