Class: Asana::Resources::Job
- Defined in:
- lib/asana/resources/job.rb
Overview
A job represents a process that handles asynchronous work.
Jobs are created when an endpoint requests an action that will be handled asynchronously. Such as project or task duplication.
Instance Attribute Summary collapse
- #gid ⇒ Object readonly
- #new_project ⇒ Object readonly
- #new_task ⇒ Object readonly
- #resource_subtype ⇒ Object readonly
- #resource_type ⇒ Object readonly
- #status ⇒ Object readonly
Class Method Summary collapse
-
.find_by_id(client, id, options: {}) ⇒ Object
Returns the complete job record for a single job.
-
.plural_name ⇒ Object
Returns the plural name of the resource.
Methods inherited from Resource
inherited, #initialize, #method_missing, #refresh, #respond_to_missing?, #to_h, #to_s
Methods included from ResponseHelper
Constructor Details
This class inherits a constructor from Asana::Resources::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Asana::Resources::Resource
Instance Attribute Details
#gid ⇒ Object (readonly)
13 14 15 |
# File 'lib/asana/resources/job.rb', line 13 def gid @gid end |
#new_project ⇒ Object (readonly)
21 22 23 |
# File 'lib/asana/resources/job.rb', line 21 def new_project @new_project end |
#new_task ⇒ Object (readonly)
23 24 25 |
# File 'lib/asana/resources/job.rb', line 23 def new_task @new_task end |
#resource_subtype ⇒ Object (readonly)
17 18 19 |
# File 'lib/asana/resources/job.rb', line 17 def resource_subtype @resource_subtype end |
#resource_type ⇒ Object (readonly)
15 16 17 |
# File 'lib/asana/resources/job.rb', line 15 def resource_type @resource_type end |
#status ⇒ Object (readonly)
19 20 21 |
# File 'lib/asana/resources/job.rb', line 19 def status @status end |
Class Method Details
.find_by_id(client, id, options: {}) ⇒ Object
Returns the complete job record for a single job.
35 36 37 38 |
# File 'lib/asana/resources/job.rb', line 35 def find_by_id(client, id, options: {}) self.new(parse(client.get("/jobs/#{id}", options: )).first, client: client) end |
.plural_name ⇒ Object
Returns the plural name of the resource.
27 28 29 |
# File 'lib/asana/resources/job.rb', line 27 def plural_name 'jobs' end |