Class: Pocus::ResponseArray
- Inherits:
-
Array
- Object
- Array
- Pocus::ResponseArray
- Defined in:
- lib/pocus/resource.rb
Overview
Combine array of resources returned by API with error and warning attributes.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(resources, errors, warnings) ⇒ ResponseArray
constructor
A new instance of ResponseArray.
Constructor Details
#initialize(resources, errors, warnings) ⇒ ResponseArray
Returns a new instance of ResponseArray.
6 7 8 9 10 |
# File 'lib/pocus/resource.rb', line 6 def initialize(resources, errors, warnings) @errors = (errors || []) @warnings = (warnings || []) super resources end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/pocus/resource.rb', line 4 def errors @errors end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
4 5 6 |
# File 'lib/pocus/resource.rb', line 4 def warnings @warnings end |