Class: GQLi::EnumValue

Inherits:
Object
  • Object
show all
Defined in:
lib/gqli/enum_value.rb

Overview

Wrapper for Enum values

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ EnumValue

Returns a new instance of EnumValue.



8
9
10
# File 'lib/gqli/enum_value.rb', line 8

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/gqli/enum_value.rb', line 6

def value
  @value
end

Instance Method Details

#to_sObject

Serializes the enum value to string



13
14
15
# File 'lib/gqli/enum_value.rb', line 13

def to_s
  value.to_s
end