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.



157
158
159
# File 'lib/graphql/client/query_result.rb', line 157

def initialize(type)
  @type = type
end

Instance Method Details

#cast(value, _errors = nil) ⇒ Object



161
162
163
# File 'lib/graphql/client/query_result.rb', line 161

def cast(value, _errors = nil)
  value
end

#|(_other) ⇒ Object



165
166
167
168
# File 'lib/graphql/client/query_result.rb', line 165

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