Class: VirtualBox::COM::XPCOMC::Spec::Function

Inherits:
VirtualBox::COM::XPCOMC::Spec show all
Defined in:
lib/virtualbox/com/xpcomc-ffi/spec.rb

Instance Attribute Summary

Attributes inherited from VirtualBox::COM::XPCOMC::Spec

#name

Instance Method Summary collapse

Methods inherited from VirtualBox::COM::XPCOMC::Spec

#hide?

Constructor Details

#initialize(name, type, args, opts) ⇒ Function

Returns a new instance of Function.



15
16
17
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 15

def initialize(name, type, args, opts)
    @name, @type, @args, @opts = name, type, args, opts
end

Instance Method Details

#signaturesObject



19
20
21
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 19

def signatures
    { name => to_call }
end

#to_callObject



23
24
25
26
27
28
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 23

def to_call
    Sig.new( if @type.nil?
             then @args
             else @args + [ [ :out, @type ] ]
             end)
end