Class: Woodhouse::Progress::ProgressClient
- Inherits:
-
Object
- Object
- Woodhouse::Progress::ProgressClient
- Defined in:
- lib/woodhouse/extensions/progress.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ ProgressClient
constructor
A new instance of ProgressClient.
- #pull(job_id) ⇒ Object
- #pull_raw(job_id) ⇒ Object
Constructor Details
#initialize(config) ⇒ ProgressClient
Returns a new instance of ProgressClient.
33 34 35 |
# File 'lib/woodhouse/extensions/progress.rb', line 33 def initialize(config) self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
31 32 33 |
# File 'lib/woodhouse/extensions/progress.rb', line 31 def config @config end |
Instance Method Details
#pull(job_id) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/woodhouse/extensions/progress.rb', line 37 def pull(job_id) progress = pull_raw(job_id) if progress JSON.parse(progress) end end |
#pull_raw(job_id) ⇒ Object
44 45 46 |
# File 'lib/woodhouse/extensions/progress.rb', line 44 def pull_raw(job_id) pull_progress(job_id) end |