Class: Metaforce::Job::Deploy
- Inherits:
-
Metaforce::Job
- Object
- Metaforce::Job
- Metaforce::Job::Deploy
- Defined in:
- lib/metaforce/job/deploy.rb
Constant Summary
Constants inherited from Metaforce::Job
Instance Attribute Summary
Attributes inherited from Metaforce::Job
Instance Method Summary collapse
-
#initialize(client, path, options = {}) ⇒ Deploy
constructor
Public: Instantiate a new deploy job.
-
#perform ⇒ Object
Public: Perform the job.
-
#result ⇒ Object
Public: Get the detailed status of the deploy.
-
#success? ⇒ Boolean
Public: Returns true if the deploy was successful.
Methods inherited from Metaforce::Job
disable_threading!, #done?, #inspect, #started?, #state, #status
Constructor Details
permalink #initialize(client, path, options = {}) ⇒ Deploy
12 13 14 15 |
# File 'lib/metaforce/job/deploy.rb', line 12 def initialize(client, path, ={}) super(client) @path, @options = path, end |
Instance Method Details
permalink #perform ⇒ Object
26 27 28 29 |
# File 'lib/metaforce/job/deploy.rb', line 26 def perform @id = client._deploy(payload, @options).id super end |
permalink #result ⇒ Object
Public: Get the detailed status of the deploy.
Examples
job.result
# => { :id => '1234', :success => true, ... }
Returns the DeployResult (www.salesforce.com/us/developer/docs/api_meta/Content/meta_deployresult.htm).
39 40 41 |
# File 'lib/metaforce/job/deploy.rb', line 39 def result @result ||= client.status(id, :deploy) end |
permalink #success? ⇒ Boolean
Public: Returns true if the deploy was successful.
Examples
job.success?
# => true
Returns true or false based on the DeployResult.
51 52 53 |
# File 'lib/metaforce/job/deploy.rb', line 51 def success? result.success end |