Exception: K8s::Error::API
- Inherits:
-
K8s::Error
- Object
- StandardError
- K8s::Error
- K8s::Error::API
- Extended by:
- Forwardable
- Defined in:
- lib/k8s/error.rb
Constant Summary
Constants inherited from K8s::Error
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(method, path, code, reason, status = nil) ⇒ API
constructor
A new instance of API.
Methods inherited from K8s::Error
Constructor Details
#initialize(method, path, code, reason, status = nil) ⇒ API
Returns a new instance of API.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/k8s/error.rb', line 15 def initialize(method, path, code, reason, status = nil) @method = method @path = path @code = code @reason = reason @status = status if status super("#{@method} #{@path} => HTTP #{@code} #{@reason}: #{@status.}") else super("#{@method} #{@path} => HTTP #{@code} #{@reason}") end end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/k8s/error.rb', line 8 def code @code end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
8 9 10 |
# File 'lib/k8s/error.rb', line 8 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/k8s/error.rb', line 8 def path @path end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
8 9 10 |
# File 'lib/k8s/error.rb', line 8 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/k8s/error.rb', line 8 def status @status end |