I am trying OptionParser using the complete example on the documentation.
I changed the program to output some random text instead of outputting the options and ARGV.
I was wondering how to actually delay the program when I run the following:
ruby optparse.rb --delay 50
I expect it to delay 50 seconds before it outputs the text. However, this is not the case, it just outputs the text straight away.
The example code on the page you linked to only shows how to parse the options, it's doesn't take any real actions based on them. There is no code in there that actually delays. You could add it yourself by doing something like: