Class: Keywright::ErrorResult
- Defined in:
- lib/keywright/error_result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#error_description ⇒ Object
readonly
Returns the value of attribute error_description.
Instance Method Summary collapse
-
#initialize(status_code, attributes = nil) ⇒ ErrorResult
constructor
A new instance of ErrorResult.
Constructor Details
#initialize(status_code, attributes = nil) ⇒ ErrorResult
Returns a new instance of ErrorResult.
6 7 8 9 10 11 12 13 |
# File 'lib/keywright/error_result.rb', line 6 def initialize( status_code, attributes = nil ) super( attributes ) if @error.nil? || @error_description.nil? error, error_description = status_code_to_error( status_code ) @error ||= error @error_description ||= error_description end end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/keywright/error_result.rb', line 4 def error @error end |
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
4 5 6 |
# File 'lib/keywright/error_result.rb', line 4 def error_description @error_description end |