Exception: CompaniesHouseInputGateway::CompaniesHouseGatewayError
- Inherits:
-
StandardError
- Object
- StandardError
- CompaniesHouseInputGateway::CompaniesHouseGatewayError
- Defined in:
- lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status = nil, _response = nil) ⇒ CompaniesHouseGatewayError
constructor
A new instance of CompaniesHouseGatewayError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, status = nil, _response = nil) ⇒ CompaniesHouseGatewayError
Returns a new instance of CompaniesHouseGatewayError.
9 10 11 12 13 |
# File 'lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb', line 9 def initialize( = nil, status = nil, _response = nil) @message = @status = status @response_body = response_body end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb', line 5 def @message end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
7 8 9 |
# File 'lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb', line 7 def response_body @response_body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb', line 6 def status @status end |
Instance Method Details
#to_s ⇒ Object
15 16 17 18 |
# File 'lib/companies_house_input_gateway/errors/companies_house_gateway_error.rb', line 15 def to_s status_string = @status.nil? ? '' : "(Status #{@status}) " "#{status_string}#{@message}" end |