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


54
55
56
57
# File 'lib/graphql/schema_comparator/changes.rb', line 54

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


52
53
54
# File 'lib/graphql/schema_comparator/changes.rb', line 52

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive


52
53
54
# File 'lib/graphql/schema_comparator/changes.rb', line 52

def directive
  @directive
end

Instance Method Details

#messageObject


59
60
61
# File 'lib/graphql/schema_comparator/changes.rb', line 59

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