11 lines
254 B
Ruby
11 lines
254 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-#{Time.now.strftime('%Y%W')}.log","a+")
|
|
output << "#{Time.now.to_i};#{person};#{product};#{amount}\n"
|
|
output.close
|