Class: Brick::SeedsBuilder::AirtableObject

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/brick/seeds_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, attributes, created_at) ⇒ AirtableObject

Returns a new instance of AirtableObject.



321
322
323
324
325
# File 'lib/generators/brick/seeds_builder.rb', line 321

def initialize(table, attributes, created_at)
  self.table = table
  self.attributes_before_type_cast = attributes.each_with_object({}) { |a, s| s[::Brick::AirtableApiCaller.sane_name(a.first)] = a.last }
  self.created_at = created_at
end

Instance Attribute Details

#attributes_before_type_castObject

Returns the value of attribute attributes_before_type_cast.



320
321
322
# File 'lib/generators/brick/seeds_builder.rb', line 320

def attributes_before_type_cast
  @attributes_before_type_cast
end

#created_atObject

Returns the value of attribute created_at.



320
321
322
# File 'lib/generators/brick/seeds_builder.rb', line 320

def created_at
  @created_at
end

#tableObject

Returns the value of attribute table.



320
321
322
# File 'lib/generators/brick/seeds_builder.rb', line 320

def table
  @table
end