class Delphix::Response

Attributes

details[RW]

Public Class Methods

new(details={}) click to toggle source

The private new method accepts a reference string and a hash

# File lib/delphix/response.rb, line 8
def initialize(details={})
  @details = details
end

Public Instance Methods

is_error?() click to toggle source
# File lib/delphix/response.rb, line 24
def is_error?
  @details['type'] == 'ErrorResult'
end
job() click to toggle source
# File lib/delphix/response.rb, line 28
def job
  return nil if @details['job'] == nil
  Delphix::Job.new( @details['job'])
end
status() click to toggle source
# File lib/delphix/response.rb, line 16
def status
  @details['status'] || 'unknown'
end
to_s() click to toggle source
# File lib/delphix/response.rb, line 38
def to_s
  "#{self.class.name}[#{type}, #{status}]"
end
type() click to toggle source
# File lib/delphix/response.rb, line 12
def type
  @details['type'] || 'unknown'
end
wait_for_completion() click to toggle source
# File lib/delphix/response.rb, line 33
def wait_for_completion
  return if is_error?
  job.wait_for_completion if job
end