Implement CLI application by editing main.rb.
You may add new files to keep your code clean, if it is allowed in your challenge.
In main.rb, there is a function called main
, which gives command line arguments as argv
.
def main(argv)
# code to run
end
argv
passed here is came from index.rb which passes ARGV
to main
function.
Use the standard puts
method to output results to stdout
.
puts "Hello World"
If you want to use external libraries, do the following:
- Write the library name in Gemfile