Proc (Procdures)
- A Proc object is an encapsulation of a block of code, which can be stored in a local variable, passed to a method or another Proc, and can be called.
#
Example 1#
Example 2#
Procs with multiple params:#
Procs doesn't throw an error when wrong numbers of variables are passedTODO: try to do something after Proc.new
Resources: