lib/my_scripts/script.rb
def usage( examples, explanation = nil )
      puts "Script #{@name} #{version} - Usage:"
      (examples.respond_to?(:split) ? examples.split("\n") : examples).map {|line| puts "    #{@name} #{line}"}
      puts explanation if explanation
      exit 1
    end
def usage( examples, explanation = nil )
      puts "Script #{@name} #{version} - Usage:"
      (examples.respond_to?(:split) ? examples.split("\n") : examples).map {|line| puts "    #{@name} #{line}"}
      puts explanation if explanation
      exit 1
    end
Outputs usage notes (and optional extended explanation), then exits with code 1