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
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#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
-
#initialize(type, old_field, new_field) ⇒ FieldDescriptionChanged
constructor
A new instance of FieldDescriptionChanged.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(type, old_field, new_field) ⇒ FieldDescriptionChanged
Returns a new instance of FieldDescriptionChanged.
815 816 817 818 819 820 |
# File 'lib/graphql/schema_comparator/changes.rb', line 815 def initialize(type, old_field, new_field) @criticality = Changes::Criticality.non_breaking @type = type @old_field = old_field @new_field = new_field end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
813 814 815 |
# File 'lib/graphql/schema_comparator/changes.rb', line 813 def criticality @criticality end |
#new_field ⇒ Object (readonly)
Returns the value of attribute new_field.
813 814 815 |
# File 'lib/graphql/schema_comparator/changes.rb', line 813 def new_field @new_field end |
#old_field ⇒ Object (readonly)
Returns the value of attribute old_field.
813 814 815 |
# File 'lib/graphql/schema_comparator/changes.rb', line 813 def old_field @old_field end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
813 814 815 |
# File 'lib/graphql/schema_comparator/changes.rb', line 813 def type @type end |
Instance Method Details
#message ⇒ Object
822 823 824 825 |
# File 'lib/graphql/schema_comparator/changes.rb', line 822 def "Field `#{old_field.path}` description changed"\ " from `#{old_field.description}` to `#{new_field.description}`" end |
#path ⇒ Object
827 828 829 |
# File 'lib/graphql/schema_comparator/changes.rb', line 827 def path old_field.path end |