parameter, file, text = ARGV

if parameter == '-w' #=> write mode
...

Ruby Clumsy file I/O program

by thaostra.myopenid.com, June 21, 2010 00:06, 1 refactoring, tagged with exceptions, arguments, parameters, I/O

This is my first attempt of...

55502f40dc8b7c769880b10874abc9d0 Talk
begin
  data["body"] = content[1].split(/\W{2,}/)[0].strip()
rescue Exception => e
...

Ruby Exception Handling in Ruby

by Tafkas, March 19, 2010 23:38, 4 refactorings, tagged with ruby, exceptions

I have the following code w...

693a4661eaa71435ce5ebe61de64c5a4 Talk