module InstanceVariableOverride
Because we set 2 magic variables when processing the graph, as_json will fail on a PORO with stack level too deep
as_json calls instance_variables, defined in active_support/core_ext/object/instance_variables.rb
So, override that to not see these magic vars.
Public Instance Methods
Source
# File lib/graphiti.rb, line 221 def instance_values values = super if @__graphiti_serializer values.reject! do |v| ["__graphiti_serializer", "__graphiti_resource"].include?(v) end end values end
Calls superclass method