module Gamefic::Scripting::Proxies

def unproxy(object)

Returns:
  • (Object) -

Parameters:
  • object (Object) --
def unproxy(object)
  case object
  when Proxy::Base
    object.fetch self
  when Array
    object.map { |obj| unproxy obj }
  when Hash
    object.transform_values { |val| unproxy val }
  when Response, Query::Base
    object.bind(self)
  else
    object
  end
end