Class: GraphQL::Syntax::Edge
- Inherits:
-
Object
- Object
- GraphQL::Syntax::Edge
- Defined in:
- lib/graphql/syntax/edge.rb
Instance Attribute Summary collapse
-
#calls ⇒ Object
readonly
Returns the value of attribute calls.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Instance Method Summary collapse
- #call_hash ⇒ Object
-
#initialize(identifier:, fields:, calls:) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(identifier:, fields:, calls:) ⇒ Edge
Returns a new instance of Edge.
3 4 5 6 7 |
# File 'lib/graphql/syntax/edge.rb', line 3 def initialize(identifier:, fields:, calls:) @identifier = identifier @calls = calls @fields = fields end |
Instance Attribute Details
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
2 3 4 |
# File 'lib/graphql/syntax/edge.rb', line 2 def calls @calls end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
2 3 4 |
# File 'lib/graphql/syntax/edge.rb', line 2 def fields @fields end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
2 3 4 |
# File 'lib/graphql/syntax/edge.rb', line 2 def identifier @identifier end |
Instance Method Details
#call_hash ⇒ Object
9 10 11 |
# File 'lib/graphql/syntax/edge.rb', line 9 def call_hash calls.inject({}) { |memo, call| memo[call.identifier] = call.argument; memo } end |