That's called running a ruby script/program from the command line and passing "flags" like -c
are passed to the script as command line arguments and are an array of string values separated by spaces normally.
Here's your very simple script:
tool.rb
#!/usr/bin/env ruby
if ARGV[0] == '-c'
puts 'blah blah'
end
You can run this from the command line exactly as you requested.
ruby tool.rb -c
Updated
If you need additional arguments or want to pass something else to your flag you can do as I mentioned ARGV
is an array constructed from string passed after the name of your ruby script so:
#!/usr/bin/env ruby
if ARGV[0] == '-c'
puts "blah blah #{ARGV[1]}" # array items are called by index
end
So if you do this:
ruby tool.rb -c foo
You will get:
blah blah foo