Advertisement
Guest User

Untitled

a guest
Jul 7th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def wrap(p, &block)                                                                                                          
  2.     Array.new(2) { c }.insert(1, Proc.new ).compact.each {|e| e.call }                                                                            
  3. end
  4.  
  5. wrap(Proc.new { toggle_method }) { sandwich_filling }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement