class Airtable::RecordSet

Contains records and the offset after a record query

Attributes

offset[R]
records[R]

Public Class Methods

new(results) click to toggle source

results = { “records” => [{ … }], “offset” => “abc5643” } response from records api

# File lib/airtable/record_set.rb, line 10
def initialize(results)
  # Parse records
  @records = results && results["records"] ?
    results["records"].map { |r| Record.new(r["fields"].merge("id" => r["id"])) } : []
  # Store offset
  @offset = results["offset"] if results
  # Assign delegation object
  __setobj__(@records)
end