Class: GraphQL::Client::QueryResult::EnumWrapper

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

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ EnumWrapper

Returns a new instance of EnumWrapper.



155
156
157
# File 'lib/graphql/client/query_result.rb', line 155

def initialize(type)
  @type = type
end

Instance Method Details

#cast(value, _errors = nil) ⇒ Object



159
160
161
# File 'lib/graphql/client/query_result.rb', line 159

def cast(value, _errors = nil)
  value
end

#|(_other) ⇒ Object



163
164
165
166
# File 'lib/graphql/client/query_result.rb', line 163

def |(_other)
  # XXX: How would enums merge?
  self
end