Class: GraphQL::SchemaComparator::Changes::EnumValueAdded

Inherits:
Object
  • 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) ⇒ EnumValueAdded

Returns a new instance of EnumValueAdded.



193
194
195
196
197
# File 'lib/graphql/schema_comparator/changes.rb', line 193

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

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



191
192
193
# File 'lib/graphql/schema_comparator/changes.rb', line 191

def breaking
  @breaking
end

#enum_typeObject (readonly)

Returns the value of attribute enum_type.



191
192
193
# File 'lib/graphql/schema_comparator/changes.rb', line 191

def enum_type
  @enum_type
end

#enum_valueObject (readonly)

Returns the value of attribute enum_value.



191
192
193
# File 'lib/graphql/schema_comparator/changes.rb', line 191

def enum_value
  @enum_value
end

Instance Method Details

#messageObject



199
200
201
# File 'lib/graphql/schema_comparator/changes.rb', line 199

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