Class: Ecoportal::API::Common::BatchResponse
- Inherits:
-
Object
- Object
- Ecoportal::API::Common::BatchResponse
- Defined in:
- lib/ecoportal/api/common/batch_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body) ⇒ BatchResponse
constructor
A new instance of BatchResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(status, body) ⇒ BatchResponse
Returns a new instance of BatchResponse.
6 7 8 9 |
# File 'lib/ecoportal/api/common/batch_response.rb', line 6 def initialize(status, body) @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/ecoportal/api/common/batch_response.rb', line 5 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/ecoportal/api/common/batch_response.rb', line 5 def status @status end |
Instance Method Details
#success? ⇒ Boolean
10 11 12 |
# File 'lib/ecoportal/api/common/batch_response.rb', line 10 def success? (0..299).include?(status) end |