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 JobsBase
Methods inherited from Resource
#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)
12 13 14 |
# File 'lib/asana/resources/job.rb', line 12 def gid @gid end |
#new_project ⇒ Object (readonly)
20 21 22 |
# File 'lib/asana/resources/job.rb', line 20 def new_project @new_project end |
#new_task ⇒ Object (readonly)
22 23 24 |
# File 'lib/asana/resources/job.rb', line 22 def new_task @new_task end |
#resource_subtype ⇒ Object (readonly)
16 17 18 |
# File 'lib/asana/resources/job.rb', line 16 def resource_subtype @resource_subtype end |
#resource_type ⇒ Object (readonly)
14 15 16 |
# File 'lib/asana/resources/job.rb', line 14 def resource_type @resource_type end |
#status ⇒ Object (readonly)
18 19 20 |
# File 'lib/asana/resources/job.rb', line 18 def status @status end |
Class Method Details
.find_by_id(client, id, options: {}) ⇒ Object
Returns the complete job record for a single job.
34 35 36 37 |
# File 'lib/asana/resources/job.rb', line 34 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.
26 27 28 |
# File 'lib/asana/resources/job.rb', line 26 def plural_name 'jobs' end |