Class: ActiveRecord::Dbt::Table::Yml

Inherits:
Object
  • Object
show all
Includes:
I18nWrapper::Translate, Base
Defined in:
lib/active_record/dbt/table/yml.rb

Instance Attribute Summary collapse

Attributes included from Base

#table_name

Instance Method Summary collapse

Methods included from I18nWrapper::Translate

#translated_attribute_name, #translated_table_name

Methods included from RequiredMethods

#define_required_methods

Constructor Details

#initialize(table_name, table_data_test, columns) ⇒ Yml

Returns a new instance of Yml.



14
15
16
17
18
# File 'lib/active_record/dbt/table/yml.rb', line 14

def initialize(table_name, table_data_test, columns)
  super(table_name)
  @table_data_test = table_data_test
  @columns = columns
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.



10
11
12
# File 'lib/active_record/dbt/table/yml.rb', line 10

def columns
  @columns
end

#table_data_testObject (readonly)

Returns the value of attribute table_data_test.



10
11
12
# File 'lib/active_record/dbt/table/yml.rb', line 10

def table_data_test
  @table_data_test
end

Instance Method Details

#propertiesObject



20
21
22
23
24
25
# File 'lib/active_record/dbt/table/yml.rb', line 20

def properties
  {
    **table_properties,
    'columns' => columns.map(&:properties)
  }.compact
end