This post originated from an RSS feed registered with Ruby Buzz
by Lyle Johnson.
Original Post: How to pass the current binding���s block to some other method?
Feed Title: Lovable Lyle
Feed URL: http://feeds.feedburner.com/LovableLyle
Feed Description: This weblog typically features articles about the Ruby programming language, the Semantic Web, or whatever else is on Lyle's mind on a given day.
I’ve posted this question to the mailing list but I might as well ask it here too, in case any of my three or four readers know the answer. Suppose I have a method that will yield to a block if one is given:
def try(x, y, z)
# … do some other stuff first …
yield self [...]