Class: GraphQL::Language::Nodes::InputObject
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::InputObject
- Defined in:
- lib/graphql/language/nodes.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
Attributes inherited from AbstractNode
Instance Method Summary collapse
Methods inherited from AbstractNode
child_attributes, #children, #initialize, #position
Constructor Details
This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
152 153 154 |
# File 'lib/graphql/language/nodes.rb', line 152 def arguments @arguments end |
Instance Method Details
#initialize_node(arguments: []) ⇒ Object
155 156 157 |
# File 'lib/graphql/language/nodes.rb', line 155 def initialize_node(arguments: []) @arguments = arguments end |
#to_h(options = {}) ⇒ Object
159 160 161 162 163 164 165 |
# File 'lib/graphql/language/nodes.rb', line 159 def to_h(={}) arguments.inject({}) do |memo, pair| v = pair.value memo[pair.name] = v.is_a?(InputObject) ? v.to_h : v memo end end |