Sha256: e6b331dadc850dc13c8b18f4f073198be5791fb178da78e4f1eefbbc207ad257

Contents?: true

Size: 551 Bytes

Versions: 6

Compression:

Stored size: 551 Bytes

Contents

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

    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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
baleen-0.1.1 lib/baleen/job.rb
baleen-0.1.0 lib/baleen/job.rb
baleen-0.0.12 lib/baleen/job.rb
baleen-0.0.11 lib/baleen/job.rb
baleen-0.0.10 lib/baleen/job.rb
baleen-0.0.9 lib/baleen/job.rb