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.



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

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



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

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



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

def directive
  @directive
end

Instance Method Details

#messageObject



509
510
511
# File 'lib/graphql/schema_comparator/changes.rb', line 509

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