I’m a mid level java guy trying out Ruby. I’m rewriting a java ftp app
in Ruby to learn about this aspect of language. One thing I’ve been
wondering is how Ruby handles problems encountered with ftp. For
example, in Java (using the commons.net.ftp lib) I’m constantly
checking to ensure my ftp calls actually work. When logging in, I check
to make sure that the reply code indicates a successful login.
Afterwards, I rely on the boolean return values provided by the methods
in the library to know if I actually downloaded/uploaded a file, etc.
In the Ruby docs, the return_code function is listed as “Obsolete.” In
the examples I’ve studied, I haven’t seen the kind of checking I’m
accustomed to writing. I realize that - examples being what they are -
the focus is on brevity and functionality, and “boiler plate” code may
be omitted.
What are the best practices in this case?
Thanks