View difference between Paste ID: 9xDZNfgF and PG7gYcNU
SHOW: | | - or go back to the newest paste.
1
def wrap(p, &block)                                                                                                          
2
    Array.new(2) { c }.insert(1, Proc.new ).compact                                                                            
3
end 
4
5
wrap(Proc.new { toggle_method }) { sandwich_filling }.each {|e| e.call }