languages/ruby/lib/oso/polar/query.rb
# Fetch the next result from calling a Ruby method and prepare it for
# transmission across the FFI boundary.
#
# @param method [#to_sym]
# @param args [Array<Hash>]
# @param call_id [Integer]
# @param instance [Hash<String, Object>]
# @raise [Error] if the FFI call raises one.
Fetch the next result from calling a Ruby method and prepare it for
transmission across the FFI boundary.
Fetch the next result from calling a Ruby method and prepare it for transmission across the FFI boundary .
def handle_call(attribute, call_id:, instance:, args:)
        register_call(attribute, call_id: call_id, instance: instance, args: args)
        result = JSON.dump(next_call_result(call_id))
        call_result(result, call_id: call_id)
      rescue InvalidCallError => e
        application_error(e.message)
        call_result(nil, call_id: call_id)
      rescue StopIteration
        call_result(nil, call_id: call_id)
      end
def handle_call ( attribute , call_id : , instance : , args : ) register_call ( attribute , call_id : call_id , instance : instance , args : args ) result = JSON . dump ( next_call_result ( call_id ) ) call_result ( result , call_id : call_id ) rescue InvalidCallError => e application_error ( e . message ) call_result ( nil , call_id : call_id ) rescue StopIteration call_result ( nil , call_id : call_id ) end
Fetch the next result from calling a Ruby method and prepare it for
transmission across the FFI boundary.
Fetch the next result from calling a Ruby method and prepare it for transmission across the FFI boundary .
[Error] if the FFI call raises one.
[ Error ] if the FFI call raises one .
attribute
call_id
instance
args
None