Class: Airtable::Record
Overview
Object corresponding to an Airtable Record
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(token, base_id, table_id, api_response) ⇒ Record
constructor
A new instance of Record.
Methods inherited from Resource
Constructor Details
#initialize(token, base_id, table_id, api_response) ⇒ Record
Returns a new instance of Record.
7 8 9 10 11 12 13 14 15 |
# File 'lib/airtable/record.rb', line 7 def initialize(token, base_id, table_id, api_response) @token = token @base_id = base_id @table_id = table_id api_response.deep_symbolize_keys.each do |key, value| instance_variable_set(:"@#{key}", value) end self.class.headers({ 'Authorization': "Bearer #{@token}", 'Content-Type': 'application/json' }) end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
5 6 7 |
# File 'lib/airtable/record.rb', line 5 def fields @fields end |