Class: Rmb::Job

Inherits:
Resource show all
Defined in:
lib/rmb/job.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Resource

client, #initialize

Constructor Details

This class inherits a constructor from Rmb::Resource

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/rmb/job.rb', line 3

def id
  @id
end

#inputsObject

Returns the value of attribute inputs.



3
4
5
# File 'lib/rmb/job.rb', line 3

def inputs
  @inputs
end

#job_typeObject

Returns the value of attribute job_type.



3
4
5
# File 'lib/rmb/job.rb', line 3

def job_type
  @job_type
end

#outputsObject

Returns the value of attribute outputs.



3
4
5
# File 'lib/rmb/job.rb', line 3

def outputs
  @outputs
end

#pingback_urlObject

Returns the value of attribute pingback_url.



3
4
5
# File 'lib/rmb/job.rb', line 3

def pingback_url
  @pingback_url
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/rmb/job.rb', line 3

def state
  @state
end

#usingObject

Returns the value of attribute using.



3
4
5
# File 'lib/rmb/job.rb', line 3

def using
  @using
end

Class Method Details

.create(job_type, using, inputs, outputs, pingback_url = nil) ⇒ Object

Creates a job



11
12
13
14
15
16
17
18
19
# File 'lib/rmb/job.rb', line 11

def self.create(job_type,using,inputs,outputs,pingback_url=nil)
  Rmb::Resource.client.create_job({
    :job_type => job_type,
    :using => using,
    :inputs => inputs,
    :outputs => outputs,
    :pingback_url => pingback_url
  })
end

.find(id, drop_name, asset_name_or_id) ⇒ Object

Finds a job for a drop and asset



6
7
8
# File 'lib/rmb/job.rb', line 6

def self.find(id,drop_name,asset_name_or_id)
  Rmb::Resource.client.job(id, drop_name, asset_name_or_id)
end