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
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#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
-
#initialize(old_directive, new_directive) ⇒ DirectiveDescriptionChanged
constructor
A new instance of DirectiveDescriptionChanged.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(old_directive, new_directive) ⇒ DirectiveDescriptionChanged
Returns a new instance of DirectiveDescriptionChanged.
796 797 798 799 800 |
# File 'lib/graphql/schema_comparator/changes.rb', line 796 def initialize(old_directive, new_directive) @criticality = Changes::Criticality.non_breaking @old_directive = old_directive @new_directive = new_directive end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
794 795 796 |
# File 'lib/graphql/schema_comparator/changes.rb', line 794 def criticality @criticality end |
#new_directive ⇒ Object (readonly)
Returns the value of attribute new_directive.
794 795 796 |
# File 'lib/graphql/schema_comparator/changes.rb', line 794 def new_directive @new_directive end |
#old_directive ⇒ Object (readonly)
Returns the value of attribute old_directive.
794 795 796 |
# File 'lib/graphql/schema_comparator/changes.rb', line 794 def old_directive @old_directive end |
Instance Method Details
#message ⇒ Object
802 803 804 805 |
# File 'lib/graphql/schema_comparator/changes.rb', line 802 def "Directive `#{new_directive.graphql_name}` description changed"\ " from `#{old_directive.description}` to `#{new_directive.description}`" end |
#path ⇒ Object
807 808 809 |
# File 'lib/graphql/schema_comparator/changes.rb', line 807 def path "@#{old_directive.graphql_name}" end |