Sha256: 215d23ff24da8ef175128dfd3c88e7d294c2911f4012a064625e86b456909b37

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Dbt
    module Factory
      module Model
        module StagingFactory
          def self.yml_build(table_name)
            table_factory = ActiveRecord::Dbt::Factory::TableFactory.build(table_name)
            yml = ActiveRecord::Dbt::Model::Staging::Yml.new(table_factory)
            struct = Struct.new(:export_path, :yml_dump, keyword_init: true)

            struct.new(
              export_path: yml.export_path,
              yml_dump: YAML.dump(yml.config.deep_stringify_keys)
            )
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-dbt-0.2.0 lib/active_record/dbt/factory/model/staging_factory.rb
activerecord-dbt-0.1.0 lib/active_record/dbt/factory/model/staging_factory.rb