lib/baleen/job.rb in baleen-0.0.2 vs lib/baleen/job.rb in baleen-0.0.9

- old
+ new

@@ -1,18 +1,29 @@ +require 'baleen/result_display' + module Baleen class Job def initialize(client, msg) @client = client @msg = msg + @response = nil end def start + start_time = Time.now @client.request(@msg.params) + @response = @client.wait_response + end_time = Time.now + show_results(start_time, end_time) end - def result - @client.result + private + + def show_results(s_time, e_time) + display = ResultDisplay.new(@response, start_time: s_time, end_time: e_time) + display.summary + display.detail end end end \ No newline at end of file