Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/tafunc_array.rb

Overview

define Array#tafunc.

Args

Return

Instance Method Summary collapse

Instance Method Details

#tafunc(func) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/tafunc_array.rb', line 19

def tafunc( func )

  #
  #ret = {}
  ret = nil

  #
  ret = TaLib::TAFunc.new( func ) do |taf|

    raise "Conflicts: # of inputs!" if taf.param_attr( :in ).size != 1

    # inputs.
    taf.param_in_real = self

    # outputs.
    taf.param_out_setting

    # options.
    yield(taf) if block_given?

  end.call

  #
  return ret
end