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

Constructor Details

#initialize(directive) ⇒ DirectiveAdded

Returns a new instance of DirectiveAdded.



249
250
251
252
# File 'lib/graphql/schema_comparator/changes.rb', line 249

def initialize(directive)
  @directive = directive
  @breaking = false
end

Instance Attribute Details

#directiveObject (readonly)

Returns the value of attribute directive.



247
248
249
# File 'lib/graphql/schema_comparator/changes.rb', line 247

def directive
  @directive
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


258
259
260
# File 'lib/graphql/schema_comparator/changes.rb', line 258

def breaking?
  !!@breaking
end

#messageObject



254
255
256
# File 'lib/graphql/schema_comparator/changes.rb', line 254

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