matkant_invoice/update.rb

11 lines
224 B
Ruby
Raw Normal View History

2017-01-30 13:06:38 +00:00
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