Class: Airtable::ORM::BatchResult
- Inherits:
-
Struct
- Object
- Struct
- Airtable::ORM::BatchResult
- Defined in:
- lib/airtable/orm/batch_result.rb
Overview
Holds the result of a batch update operation.
Instance Attribute Summary collapse
-
#failed ⇒ Array
Records that failed validation or API call.
-
#skipped ⇒ Array
Records that had no changes and were not sent to the API.
-
#updated ⇒ Array
Records that were successfully sent to the API and updated.
Instance Method Summary collapse
- #any_failed? ⇒ Boolean
-
#initialize(updated: [], skipped: [], failed: []) ⇒ BatchResult
constructor
A new instance of BatchResult.
- #none_failed? ⇒ Boolean
- #total_count ⇒ Object
Constructor Details
#initialize(updated: [], skipped: [], failed: []) ⇒ BatchResult
Returns a new instance of BatchResult.
11 12 13 |
# File 'lib/airtable/orm/batch_result.rb', line 11 def initialize(updated: [], skipped: [], failed: []) super end |
Instance Attribute Details
#failed ⇒ Array
Records that failed validation or API call
10 11 12 |
# File 'lib/airtable/orm/batch_result.rb', line 10 def failed @failed end |
#skipped ⇒ Array
Records that had no changes and were not sent to the API
10 11 12 |
# File 'lib/airtable/orm/batch_result.rb', line 10 def skipped @skipped end |
#updated ⇒ Array
Records that were successfully sent to the API and updated
10 11 12 |
# File 'lib/airtable/orm/batch_result.rb', line 10 def updated @updated end |
Instance Method Details
#any_failed? ⇒ Boolean
19 20 21 |
# File 'lib/airtable/orm/batch_result.rb', line 19 def any_failed? failed.any? end |
#none_failed? ⇒ Boolean
15 16 17 |
# File 'lib/airtable/orm/batch_result.rb', line 15 def none_failed? failed.empty? end |
#total_count ⇒ Object
23 24 25 |
# File 'lib/airtable/orm/batch_result.rb', line 23 def total_count updated.size + skipped.size + failed.size end |