11 lines
224 B
Ruby
11 lines
224 B
Ruby
person = ARGV[0]
|
|
product = ARGV[1]
|
|
amount = ARGV[2]
|
|
log_dir = "./log/"
|
|
|
|
amount = 1.0 unless amount
|
|
|
|
output = File.open("#{log_dir}/matkant.log","a")
|
|
output << "#{Time.now.to_i};#{person};#{product};#{amount}\n"
|
|
output.close
|