Class: GraphQL::SchemaComparator::Changes::DirectiveDescriptionChanged
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::DirectiveDescriptionChanged
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#new_directive ⇒ Object
readonly
Returns the value of attribute new_directive.
-
#old_directive ⇒ Object
readonly
Returns the value of attribute old_directive.
Instance Method Summary collapse
- #breaking? ⇒ Boolean
-
#initialize(old_directive, new_directive) ⇒ DirectiveDescriptionChanged
constructor
A new instance of DirectiveDescriptionChanged.
- #message ⇒ Object
Constructor Details
#initialize(old_directive, new_directive) ⇒ DirectiveDescriptionChanged
Returns a new instance of DirectiveDescriptionChanged.
352 353 354 355 356 |
# File 'lib/graphql/schema_comparator/changes.rb', line 352 def initialize(old_directive, new_directive) @old_directive = old_directive @new_directive = new_directive @breaking = false end |
Instance Attribute Details
#new_directive ⇒ Object (readonly)
Returns the value of attribute new_directive.
350 351 352 |
# File 'lib/graphql/schema_comparator/changes.rb', line 350 def new_directive @new_directive end |
#old_directive ⇒ Object (readonly)
Returns the value of attribute old_directive.
350 351 352 |
# File 'lib/graphql/schema_comparator/changes.rb', line 350 def old_directive @old_directive end |
Instance Method Details
#breaking? ⇒ Boolean
363 364 365 |
# File 'lib/graphql/schema_comparator/changes.rb', line 363 def breaking? !!@breaking end |
#message ⇒ Object
358 359 360 361 |
# File 'lib/graphql/schema_comparator/changes.rb', line 358 def "Directive `#{new_directive.name}` description changed"\ " from `#{old_directive.description}` to `#{new_directive.description}`" end |