Class: ActiveRecord::Dbt::Source::Yml

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/dbt/source/yml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tables) ⇒ Yml

Returns a new instance of Yml.



11
12
13
14
# File 'lib/active_record/dbt/source/yml.rb', line 11

def initialize(tables)
  @tables = tables
  @config = ActiveRecord::Dbt::Config.instance
end

Instance Attribute Details

#tablesObject (readonly)

Returns the value of attribute tables.



7
8
9
# File 'lib/active_record/dbt/source/yml.rb', line 7

def tables
  @tables
end

Instance Method Details

#dumpObject



20
21
22
# File 'lib/active_record/dbt/source/yml.rb', line 20

def dump
  YAML.dump(properties.deep_stringify_keys)
end

#export_pathObject



16
17
18
# File 'lib/active_record/dbt/source/yml.rb', line 16

def export_path
  "#{export_directory_path}/models/sources/#{source_name}/src_#{source_name}.yml"
end