1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/usr/bin/env ruby # template.rb # Patrick Simianer <p@simianer.de> # YYYY-MM-DD STDIN.set_encoding 'utf-8' STDOUT.set_encoding 'utf-8' STDERR.set_encoding 'utf-8' STDOUT.sync = true STDERR.sync = true def fun(arg) puts 'Hello, World!' end if __FILE__ == $0 arg = ARGV[0] fun(arg) end