Top Level Namespace
Defined Under Namespace
Modules: Enumerable, Kernel, Lab42
Classes: Array, Dir, File, Hash, Module, Object, OpenObject, Proc
Constant Summary
collapse
- Identity =
Lab42::Behavior::ProcBehavior.new{ |x| x }
Instance Method Summary
collapse
Methods included from Kernel
#require_relative_dir
Instance Method Details
#_realize_args_(para, args) ⇒ Object
6
7
8
|
# File 'lib/lab42/core/console_tools/func.rb', line 6
def _realize_args_ para, args
args.map{ |arg| Proc === arg ? arg.(para) :arg }
end
|
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/lab42/core/console_tools/func.rb', line 11
def f *args
if Symbol === args.first
-> r do
r.send *_realize_args_( r, args )
end
else
-> *r do
args.first.send *_realize_args_( r.first, args.drop(1) )
end
end
end
|