module RRRSpec::Server::JSONConstructor::TaskJSONConstructor
Public Instance Methods
as_full_json()
click to toggle source
# File lib/rrrspec/server/json_constructor.rb, line 81 def as_full_json h = as_json(except: [:id, :taskset_id, :trials], include: { 'taskset' => { only: :key } }) h['trials'] = trials.map(&:as_full_json) h end
as_json_for_result_page()
click to toggle source
# File lib/rrrspec/server/json_constructor.rb, line 88 def as_json_for_result_page { 'id' => id, 'key' => key, 'status' => status, 'spec_path' => spec_file, 'estimate_sec' => estimate_sec, 'trials' => trials.map(&:as_json_for_result_page), } end
as_short_json()
click to toggle source
# File lib/rrrspec/server/json_constructor.rb, line 74 def as_short_json h = as_json(except: [:id, :taskset_id, :trials], include: { 'taskset' => { only: :key } }) h['trials'] = trials.map { |trial| trial.as_json(only: :key) } h end