Method: VirtualBox::COM::XPCOMC::Sig#initialize
- Defined in:
- lib/virtualbox/com/xpcomc-ffi/sig.rb
#initialize(sig) ⇒ Sig
Store and normalize signatures
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/virtualbox/com/xpcomc-ffi/sig.rb', line 16 def initialize(sig) @sig = sig.map {|item| if item.is_a?(Array) && item[0] == :out then [ item[1], :out ] else [ item, :in ] end }.freeze.each{|type, way| # Sanity check: only `[type]` or `type` if type.is_a?(Array) && type.length != 1 raise ArgumentError, "only arrays of simple type are supported" end } end |