Class: GraphQL::SchemaComparator::Changes::DirectiveLocationAdded

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, location) ⇒ DirectiveLocationAdded

Returns a new instance of DirectiveLocationAdded.



549
550
551
552
553
# File 'lib/graphql/schema_comparator/changes.rb', line 549

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

Instance Attribute Details

#directiveObject (readonly)

Returns the value of attribute directive.



547
548
549
# File 'lib/graphql/schema_comparator/changes.rb', line 547

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



547
548
549
# File 'lib/graphql/schema_comparator/changes.rb', line 547

def location
  @location
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


559
560
561
# File 'lib/graphql/schema_comparator/changes.rb', line 559

def breaking?
  !!@breaking
end

#messageObject



555
556
557
# File 'lib/graphql/schema_comparator/changes.rb', line 555

def message
  "Location `#{location}` was added to directive `#{directive.name}`"
end