Class: Substation::Response::Exception::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/substation/response/exception/output.rb

Overview

Wraps response data and an exception not caught from a handler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, exception) ⇒ undefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize a new instance


36
37
38
# File 'lib/substation/response/exception/output.rb', line 36

def initialize(data, exception)
  @data, @exception = data, exception
end

Instance Attribute Details

#dataObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return the data available when exception was raised


16
17
18
# File 'lib/substation/response/exception/output.rb', line 16

def data
  @data
end

#exceptionClass<StandardError> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return the exception instance


23
24
25
# File 'lib/substation/response/exception/output.rb', line 23

def exception
  @exception
end