Class: Keywright::ErrorResult

Inherits:
Result
  • Object
show all
Defined in:
lib/keywright/error_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errorObject (readonly)

Returns the value of attribute error.



4
5
6
# File 'lib/keywright/error_result.rb', line 4

def error
  @error
end

#error_descriptionObject (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