Class: CloudClient::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud/CloudClient.rb

Overview

######################################################################### The Error Class represents a generic error in the Cloud Client library. It contains a readable representation of the error. #########################################################################

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, code = "500") ⇒ Error

message a description of the error



155
156
157
158
# File 'lib/cloud/CloudClient.rb', line 155

def initialize(message=nil, code="500")
    @message=message
    @code=code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



152
153
154
# File 'lib/cloud/CloudClient.rb', line 152

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



151
152
153
# File 'lib/cloud/CloudClient.rb', line 151

def message
  @message
end

Instance Method Details

#to_sObject



160
161
162
# File 'lib/cloud/CloudClient.rb', line 160

def to_s()
    @message
end