Top Level Namespace

Defined Under Namespace

Modules: Transproc

Instance Method Summary collapse

Instance Method Details

#Transproc(fn, *args) ⇒ Function

Access registered functions

Examples:

Transproc(:map_array, Transproc(:to_string))

Transproc(:to_string) >> Transproc(-> v { v.upcase })


75
76
77
78
79
80
# File 'lib/transproc.rb', line 75

def Transproc(fn, *args)
  case fn
  when Proc then Transproc::Function.new(fn, args: args)
  when Symbol then Transproc::Function.new(Transproc[fn], args: args)
  end
end