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.



152
153
154
# File 'lib/graphql/client/query_result.rb', line 152

def initialize(type)
  @type = type
end

Instance Method Details

#cast(value, _errors = nil) ⇒ Object



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

def cast(value, _errors = nil)
  value
end

#|(_other) ⇒ Object



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

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