class BatchKit::Database::JobRunArg
Captures the value of all defined command-line arguments to the job
Public Class Methods
from(job_run)
click to toggle source
# File lib/batch-kit/database/models.rb, line 357 def self.from(job_run) job_run.job_args && job_run.job_args.each_pair do |name, val| v = case val when String, Numeric, TrueClass, FalseClass then val else val.inspect end JobRunArg.new(job_run.job_run_id, name, v).save end end
new(job_run, name, val)
click to toggle source
Calls superclass method
# File lib/batch-kit/database/models.rb, line 368 def initialize(job_run, name, val) super(job_run: job_run, job_arg_name: name, job_arg_value: val) end