Class: GraphQL::SchemaComparator::Changes::FieldDescriptionChanged
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::FieldDescriptionChanged
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#new_field ⇒ Object
readonly
Returns the value of attribute new_field.
-
#old_field ⇒ Object
readonly
Returns the value of attribute old_field.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #breaking? ⇒ Boolean
-
#initialize(type, old_field, new_field) ⇒ FieldDescriptionChanged
constructor
A new instance of FieldDescriptionChanged.
- #message ⇒ Object
Constructor Details
#initialize(type, old_field, new_field) ⇒ FieldDescriptionChanged
Returns a new instance of FieldDescriptionChanged.
371 372 373 374 375 376 |
# File 'lib/graphql/schema_comparator/changes.rb', line 371 def initialize(type, old_field, new_field) @type = type @old_field = old_field @new_field = new_field @breaking = false end |
Instance Attribute Details
#new_field ⇒ Object (readonly)
Returns the value of attribute new_field.
369 370 371 |
# File 'lib/graphql/schema_comparator/changes.rb', line 369 def new_field @new_field end |
#old_field ⇒ Object (readonly)
Returns the value of attribute old_field.
369 370 371 |
# File 'lib/graphql/schema_comparator/changes.rb', line 369 def old_field @old_field end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
369 370 371 |
# File 'lib/graphql/schema_comparator/changes.rb', line 369 def type @type end |
Instance Method Details
#breaking? ⇒ Boolean
383 384 385 |
# File 'lib/graphql/schema_comparator/changes.rb', line 383 def breaking? !!@breaking end |
#message ⇒ Object
378 379 380 381 |
# File 'lib/graphql/schema_comparator/changes.rb', line 378 def "Field `#{type.name}.#{old_field.name}` description changed"\ " from `#{old_field.description}` to `#{new_field.description}`" end |