Class: Kaisoku::Evaluator::History

Inherits:
Object
  • Object
show all
Defined in:
lib/kaisoku/evaluator/history.rb

Instance Method Summary collapse

Instance Method Details

#append(path, payload) ⇒ Object



9
10
11
12
13
14
# File 'lib/kaisoku/evaluator/history.rb', line 9

def append(path, payload)
  FileUtils.mkdir_p(File.dirname(path))
  File.open(path, 'a') do |file|
    file.puts(JSON.generate(record(payload)))
  end
end