Class: EmailCenterApi::ResponseValidator
- Inherits:
-
Object
- Object
- EmailCenterApi::ResponseValidator
- Defined in:
- lib/email_center_api/response_validator.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseValidator
constructor
A new instance of ResponseValidator.
- #validate_and_return_response ⇒ Object
Constructor Details
#initialize(response) ⇒ ResponseValidator
Returns a new instance of ResponseValidator.
4 5 6 |
# File 'lib/email_center_api/response_validator.rb', line 4 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/email_center_api/response_validator.rb', line 3 def response @response end |
Instance Method Details
#validate_and_return_response ⇒ Object
8 9 10 11 |
# File 'lib/email_center_api/response_validator.rb', line 8 def validate_and_return_response raise_errors unless successful? response end |