Class: SmoothOperator::RemoteCall::Errors::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/smooth_operator/remote_call/errors/base.rb

Direct Known Subclasses

ConnectionFailed, Timeout

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 9

def initialize(response)
  @response = response
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def body
  @body
end

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def data
  @data
end

#headersObject (readonly)

Returns the value of attribute headers.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def headers
  @headers
end

#objectObject (readonly)

Returns the value of attribute object.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def object
  @object
end

#objectsObject (readonly)

Returns the value of attribute objects.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def objects
  @objects
end

#parsed_responseObject (readonly)

Returns the value of attribute parsed_response.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def parsed_response
  @parsed_response
end

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



7
8
9
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 7

def status
  @status
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


15
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 15

def error?; true; end

#failure?Boolean

Returns:

  • (Boolean)


19
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 19

def failure?; false; end

#http_statusObject



13
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 13

def http_status; 0; end

#success?Boolean Also known as: ok?

Returns:

  • (Boolean)


17
# File 'lib/smooth_operator/remote_call/errors/base.rb', line 17

def success?; false; end