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

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(enum_type, enum_value) ⇒ EnumValueRemoved

Returns a new instance of EnumValueRemoved


81
82
83
84
85
# File 'lib/graphql/schema_comparator/changes.rb', line 81

def initialize(enum_type, enum_value)
  @enum_value = enum_value
  @enum_type = enum_type
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


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

def criticality
  @criticality
end

#enum_typeObject (readonly)

Returns the value of attribute enum_type


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

def enum_type
  @enum_type
end

#enum_valueObject (readonly)

Returns the value of attribute enum_value


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

def enum_value
  @enum_value
end

Instance Method Details

#messageObject


87
88
89
# File 'lib/graphql/schema_comparator/changes.rb', line 87

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