Class: GraphQL::SchemaComparator::Changes::EnumValueRemoved

Inherits:
AbstractChange
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enum_type, enum_value) ⇒ EnumValueRemoved

Returns a new instance of EnumValueRemoved.



69
70
71
72
73
# File 'lib/graphql/schema_comparator/changes.rb', line 69

def initialize(enum_type, enum_value)
  @enum_value = enum_value
  @enum_type = enum_type
  @breaking = true
end

Instance Attribute Details

#enum_typeObject (readonly)

Returns the value of attribute enum_type.



67
68
69
# File 'lib/graphql/schema_comparator/changes.rb', line 67

def enum_type
  @enum_type
end

#enum_valueObject (readonly)

Returns the value of attribute enum_value.



67
68
69
# File 'lib/graphql/schema_comparator/changes.rb', line 67

def enum_value
  @enum_value
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/graphql/schema_comparator/changes.rb', line 79

def breaking?
  !!@breaking
end

#messageObject



75
76
77
# File 'lib/graphql/schema_comparator/changes.rb', line 75

def message
  "Enum value `#{enum_value.name}` was removed from enum `#{enum_type.name}`"
end