Created
          June 2, 2020 20:28 
        
      - 
      
 - 
        
Save simandebvu/02b6c83e755d34e933c4ee0cbccc1c03 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
simandebvu created this gist
Jun 2, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ peoples_ages = [25, 28, 36, 15, 17] # Definition ## First method my_proc = Proc.new {|n| n>30} ## Second method my_proc_two = proc {|n| n>12 } ## They can now be reused by calling e = peoples_ages.select(&my_proc) d = peoples_ages.select(&my_proc_two) ## You can call them using &my_proc.call()