Class: GraphQL::EnumType::EnumValue

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/enum_type.rb

Overview

A value within an GraphQL::EnumType

Created with #value

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:, deprecation_reason:, value:) ⇒ EnumValue

Returns a new instance of EnumValue.



73
74
75
76
77
78
# File 'lib/graphql/enum_type.rb', line 73

def initialize(name:, description:, deprecation_reason:, value:)
  @name = name
  @description = description
  @deprecation_reason = deprecation_reason
  @value = value
end

Instance Attribute Details

#deprecation_reasonObject (readonly)

Returns the value of attribute deprecation_reason.



72
73
74
# File 'lib/graphql/enum_type.rb', line 72

def deprecation_reason
  @deprecation_reason
end

#descriptionObject (readonly)

Returns the value of attribute description.



72
73
74
# File 'lib/graphql/enum_type.rb', line 72

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



72
73
74
# File 'lib/graphql/enum_type.rb', line 72

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



72
73
74
# File 'lib/graphql/enum_type.rb', line 72

def value
  @value
end