class DefraRuby::Aws::Response

Attributes

error[R]
success[R]

Public Class Methods

new(response_exe) click to toggle source
# File lib/defra_ruby/aws/response.rb, line 10
def initialize(response_exe)
  @success = true
  @error = nil

  capture_response(response_exe)
end

Public Instance Methods

successful?() click to toggle source
# File lib/defra_ruby/aws/response.rb, line 17
def successful?
  success
end

Private Instance Methods

capture_response(response_exe) click to toggle source
# File lib/defra_ruby/aws/response.rb, line 25
def capture_response(response_exe)
  raise UnsuccessfulOperation unless response_exe.call
rescue StandardError => e
  @error = e
  @success = false
end