Class: Brick::SeedsBuilder::AirtableObject
- Defined in:
- lib/generators/brick/seeds_builder.rb
Instance Attribute Summary collapse
-
#attributes_before_type_cast ⇒ Object
Returns the value of attribute attributes_before_type_cast.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(table, attributes, created_at) ⇒ AirtableObject
constructor
A new instance of AirtableObject.
Constructor Details
#initialize(table, attributes, created_at) ⇒ AirtableObject
Returns a new instance of AirtableObject.
331 332 333 334 335 |
# File 'lib/generators/brick/seeds_builder.rb', line 331 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_cast ⇒ Object
Returns the value of attribute attributes_before_type_cast.
330 331 332 |
# File 'lib/generators/brick/seeds_builder.rb', line 330 def attributes_before_type_cast @attributes_before_type_cast end |
#created_at ⇒ Object
Returns the value of attribute created_at.
330 331 332 |
# File 'lib/generators/brick/seeds_builder.rb', line 330 def created_at @created_at end |
#table ⇒ Object
Returns the value of attribute table.
330 331 332 |
# File 'lib/generators/brick/seeds_builder.rb', line 330 def table @table end |