Class: GraphQL::SchemaComparator::Changes::DirectiveAdded

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) ⇒ DirectiveAdded

Returns a new instance of DirectiveAdded.



500
501
502
503
# File 'lib/graphql/schema_comparator/changes.rb', line 500

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



498
499
500
# File 'lib/graphql/schema_comparator/changes.rb', line 498

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



498
499
500
# File 'lib/graphql/schema_comparator/changes.rb', line 498

def directive
  @directive
end

Instance Method Details

#messageObject



505
506
507
# File 'lib/graphql/schema_comparator/changes.rb', line 505

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