Class: GraphQL::Client::GatherNamesVisitor
- Inherits:
-
Language::Visitor
- Object
- Language::Visitor
- GraphQL::Client::GatherNamesVisitor
- Defined in:
- lib/graphql/client.rb
Instance Attribute Summary collapse
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Instance Method Summary collapse
-
#initialize(node) ⇒ GatherNamesVisitor
constructor
A new instance of GatherNamesVisitor.
- #on_fragment_spread(node, parent) ⇒ Object
Constructor Details
#initialize(node) ⇒ GatherNamesVisitor
Returns a new instance of GatherNamesVisitor.
434 435 436 437 |
# File 'lib/graphql/client.rb', line 434 def initialize(node) @names = [] super end |
Instance Attribute Details
#names ⇒ Object (readonly)
Returns the value of attribute names.
439 440 441 |
# File 'lib/graphql/client.rb', line 439 def names @names end |
Instance Method Details
#on_fragment_spread(node, parent) ⇒ Object
441 442 443 444 |
# File 'lib/graphql/client.rb', line 441 def on_fragment_spread(node, parent) @names << node.name super end |