Mega Code Archive

 
Categories / Ruby / Method
 

A Proc is an object that holds a chunk of code

# The most common way to make a Proc is with the lambda method: hello = lambda do   puts('Hello')   puts('I am inside a proc') end hello.call # we will get # Hello # I am inside a proc