Class: Baleen::Job
- Inherits:
-
Object
- Object
- Baleen::Job
- Defined in:
- lib/baleen/job.rb
Instance Method Summary collapse
-
#initialize(client, msg) ⇒ Job
constructor
A new instance of Job.
- #start ⇒ Object
Constructor Details
#initialize(client, msg) ⇒ Job
Returns a new instance of Job.
6 7 8 9 10 |
# File 'lib/baleen/job.rb', line 6 def initialize(client, msg) @client = client @msg = msg @response = nil end |
Instance Method Details
#start ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/baleen/job.rb', line 12 def start start_time = Time.now @client.request(@msg.params) @response = @client.wait_response unless @response.nil? end_time = Time.now show_results(start_time, end_time) end end |