M
Mark Volkmann
In the following code the do_this instance method of the foo object
calls yield to run the block that is passed to it.
foo.do_this(p1, p2) {
do_that(p3, p4)
}
Is there any way to make it so that do_that is executed in the context
of the foo object, i.e. it acts as though it was invoked with
foo.do_that(p3, p4)? I know I could just say "foo.do_that(p3, p4)",
but I was wondering if I could avoid that.
calls yield to run the block that is passed to it.
foo.do_this(p1, p2) {
do_that(p3, p4)
}
Is there any way to make it so that do_that is executed in the context
of the foo object, i.e. it acts as though it was invoked with
foo.do_that(p3, p4)? I know I could just say "foo.do_that(p3, p4)",
but I was wondering if I could avoid that.