I think this is better written by assembling a list of arguments in an array, depending on options.  Less duplication that way.  See `wireshark.rb` as one of many examples.