module RRRSpec::Server::LogFilePersister
class Taskset < ActiveRecord::Base include LogFilePersister save_as_file :log, suffix: 'log' end
Requirements:
-
Have a property named 'key'
-
Set RRRSpec.configuration.execute_log_text_path
-
Have a singleton method :after_save
Provides:
-
Methods named 'log', 'log=', 'log_log_path'.
-
'after_save' hook that persists a log to the file pointed by log_log_path.
-
Persist the value of the 'log' to File.join(execute_log_text_path, “#{key.gsub(///, '_').gsub(/:/, '/')}_log.log”) if it is dirty.