Exception: ClientException
- Inherits:
-
StandardError
- Object
- StandardError
- ClientException
- Defined in:
- lib/fog/rackspace/client.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
readonly
Returns the value of attribute devices.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(msg, params = {}) ⇒ ClientException
constructor
A new instance of ClientException.
- #to_s ⇒ Object
Constructor Details
#initialize(msg, params = {}) ⇒ ClientException
Returns a new instance of ClientException.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fog/rackspace/client.rb', line 7 def initialize(msg, params={}) @msg = msg @scheme = params[:http_scheme] @host = params[:http_host] @port = params[:http_port] @path = params[:http_path] @query = params[:http_query] @status = params[:http_status] @reason = params[:http_reason] @device = params[:http_device] end |
Instance Attribute Details
#devices ⇒ Object (readonly)
Returns the value of attribute devices.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def devices @devices end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def host @host end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def path @path end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def port @port end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def query @query end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def reason @reason end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def scheme @scheme end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/fog/rackspace/client.rb', line 6 def status @status end |
Instance Method Details
#to_s ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fog/rackspace/client.rb', line 19 def to_s a = @msg b = '' b += "#{@scheme}://" if @scheme b += @host if @host b += ":#{@port}" if @port b += @path if @path b += "?#{@query}" if @query b ? b = "#{b} #{@status}" : b = @status.to_s if @status b ? b = "#{b} #{@reason}" : b = "- #{@reason}" if @reason b ? b = "#{b}: device #{@device}" : b = "device #{@device}" if @device b ? "#{a} #{b}" : a end |