Class: YamlDb::Load
- Inherits:
-
SerializationHelper::Load
- Object
- SerializationHelper::Load
- YamlDb::Load
- Defined in:
- lib/yaml_db.rb
Class Method Summary collapse
Methods inherited from SerializationHelper::Load
load, load_records, load_table, parse_erb, reset_pk_sequence!, truncate_table
Class Method Details
.load_documents(io, truncate = true) ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/yaml_db.rb', line 59 def self.load_documents(io, truncate = true) YAML.load_documents(io) do |ydoc| ydoc.keys.each do |table_name| next if ydoc[table_name].nil? load_table(table_name, ydoc[table_name], truncate) end end end |