Class: GraphQL::SchemaComparator::Changes::DirectiveRemoved

Inherits:
AbstractChange
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(directive) ⇒ DirectiveRemoved

Returns a new instance of DirectiveRemoved.



63
64
65
66
# File 'lib/graphql/schema_comparator/changes.rb', line 63

def initialize(directive)
  @directive = directive
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



61
62
63
# File 'lib/graphql/schema_comparator/changes.rb', line 61

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



61
62
63
# File 'lib/graphql/schema_comparator/changes.rb', line 61

def directive
  @directive
end

Instance Method Details

#messageObject



68
69
70
# File 'lib/graphql/schema_comparator/changes.rb', line 68

def message
  "Directive `#{directive.name}` was removed"
end

#pathObject



72
73
74
# File 'lib/graphql/schema_comparator/changes.rb', line 72

def path
  "@#{directive.name}"
end