Module: Lab42::Function::MakeFunction
Instance Method Summary collapse
Instance Method Details
#make_function(from) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lab42/function/make_function.rb', line 5 def make_function from case from when Symbol Lab42::Function.free_receiver from when Array make_function_from_ary from when Proc, Method Lab42::Function.new from, from.arity when Lab42::Function from else raise ArgumentError, "cannot make a behavior from #{from.inspect}" end end |