Exception: TogoWS::HTTPError

Inherits:
Error
  • Object
show all
Defined in:
lib/togows/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message_text, body) ⇒ HTTPError

Returns a new instance of HTTPError.



9
10
11
12
13
14
# File 'lib/togows/error.rb', line 9

def initialize(code, message_text, body)
  @code = code.to_i
  @message_text = message_text
  @body = body.to_s
  super("#{code} #{message_text}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/togows/error.rb', line 7

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/togows/error.rb', line 7

def code
  @code
end

#message_textObject (readonly)

Returns the value of attribute message_text.



7
8
9
# File 'lib/togows/error.rb', line 7

def message_text
  @message_text
end