Exception: Cortex::ClientExceptions::ErrorFromResult
- Inherits:
-
StandardError
- Object
- StandardError
- Cortex::ClientExceptions::ErrorFromResult
- Defined in:
- lib/cortex/client_exceptions.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(arg) ⇒ ErrorFromResult
constructor
A new instance of ErrorFromResult.
Constructor Details
#initialize(arg) ⇒ ErrorFromResult
Returns a new instance of ErrorFromResult.
5 6 7 8 9 10 |
# File 'lib/cortex/client_exceptions.rb', line 5 def initialize(arg) throw ArgumentError.new(msg: "Expected: Cortex::Result, Received: #{arg.class}") unless arg.is_a?(Cortex::Result) @status = arg.status @errors = arg.errors @contents = arg.contents end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
4 5 6 |
# File 'lib/cortex/client_exceptions.rb', line 4 def contents @contents end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/cortex/client_exceptions.rb', line 4 def errors @errors end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/cortex/client_exceptions.rb', line 4 def status @status end |