Using expression substitution : Interpolating « Language Basics « Ruby
- Ruby
- Language Basics
- Interpolating
Using expression substitution
# you can grab an argument off the command line and add it to the output.
#!/usr/bin/env ruby
puts "Hello, #{ARGV[0]}!"
Related examples in the same category