I've looked around but I couldn't find anything helpful on this,
although I'm sure it's been covered before:
Does Ruby have an equivalent to the "With / End With" syntax helper in
VB? It would be quite helpful when I need to execute a series of methods
on an object, but for various reasons (e.g. testing individual returns
or methods which may return nil) I don't want to chain them together.

To illustrate, here's the VB syntax I'm referring to:

With my_object
  .do1
  .do2
  .do3
End With

The current Ruby approaches I know about:

my_object.do1.do2.do3

my_object.do1
my_object.do2
my_object.do3

-- 
Posted via http://www.ruby-forum.com/.