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.


58
59
60
61
62
63
# File 'lib/graphql/enum_type.rb', line 58

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


57
58
59
# File 'lib/graphql/enum_type.rb', line 57

def deprecation_reason
  @deprecation_reason
end

#descriptionObject (readonly)

Returns the value of attribute description


57
58
59
# File 'lib/graphql/enum_type.rb', line 57

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name


57
58
59
# File 'lib/graphql/enum_type.rb', line 57

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value


57
58
59
# File 'lib/graphql/enum_type.rb', line 57

def value
  @value
end