class YamlDb::Dump
Public Class Methods
dump_table_columns(io, table)
click to toggle source
# File lib/yaml_db.rb, line 36 def self.dump_table_columns(io, table) io.write("\n") io.write({ table => { 'columns' => table_column_names(table) } }.to_yaml) end
dump_table_records(io, table)
click to toggle source
# File lib/yaml_db.rb, line 41 def self.dump_table_records(io, table) table_record_header(io) column_names = table_column_names(table) each_table_page(table) do |records| rows = SerializationHelper::Utils.unhash_records(records, column_names) io.write(YamlDb::Utils.chunk_records(records)) end end
table_record_header(io)
click to toggle source
# File lib/yaml_db.rb, line 52 def self.table_record_header(io) io.write(" records: \n") end