Class: GraphQL::Doctor::Suggestion
- Inherits:
-
Struct
- Object
- Struct
- GraphQL::Doctor::Suggestion
- Defined in:
- lib/graphql/doctor/diagnostic.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
Returns the value of attribute location.
-
#message ⇒ Object
Returns the value of attribute message.
-
#replacement ⇒ Object
Returns the value of attribute replacement.
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Suggestion
constructor
A new instance of Suggestion.
- #to_h ⇒ Object
Constructor Details
#initialize(**attributes) ⇒ Suggestion
Returns a new instance of Suggestion.
8 9 10 11 |
# File 'lib/graphql/doctor/diagnostic.rb', line 8 def initialize(**attributes) super freeze end |
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location
7 8 9 |
# File 'lib/graphql/doctor/diagnostic.rb', line 7 def location @location end |
#message ⇒ Object
Returns the value of attribute message
7 8 9 |
# File 'lib/graphql/doctor/diagnostic.rb', line 7 def @message end |
#replacement ⇒ Object
Returns the value of attribute replacement
7 8 9 |
# File 'lib/graphql/doctor/diagnostic.rb', line 7 def replacement @replacement end |
Instance Method Details
#to_h ⇒ Object
13 14 15 |
# File 'lib/graphql/doctor/diagnostic.rb', line 13 def to_h {message: , replacement: replacement, location: location&.to_h}.compact end |