Method: VirtualBox::COM::Implementer::FFI#spec_to_args

Defined in:
lib/virtualbox/com/implementer/ffi.rb

#spec_to_args(spec, args = []) ⇒ Array

Converts a function spec to a proper argument list with the given arguments.

Returns:

  • (Array)


139
140
141
142
143
144
145
# File 'lib/virtualbox/com/implementer/ffi.rb', line 139

def spec_to_args(spec, args=[])
  args = args.dup

  results = spec.inject([]) do |results, item|
    single_type_to_arg(args, item, results)
  end
end