Class: ActiveRecord::Dbt::Source::Yml
- Inherits:
-
Object
- Object
- ActiveRecord::Dbt::Source::Yml
- Defined in:
- lib/active_record/dbt/source/yml.rb
Instance Attribute Summary collapse
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
Instance Method Summary collapse
- #dump ⇒ Object
- #export_path ⇒ Object
-
#initialize(tables) ⇒ Yml
constructor
A new instance of Yml.
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
#tables ⇒ Object (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
#dump ⇒ Object
20 21 22 |
# File 'lib/active_record/dbt/source/yml.rb', line 20 def dump YAML.dump(properties.deep_stringify_keys) end |
#export_path ⇒ Object
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 |