Module: YamlDb::Utils

Defined in:
lib/yaml_db.rb

Class Method Summary collapse

Class Method Details

.chunk_records(records) ⇒ Object



25
26
27
28
29
30
# File 'lib/yaml_db.rb', line 25

def self.chunk_records(records)
  yaml = [ records ].to_yaml
  yaml.sub!(/---\s\n|---\n/, '')
  yaml.sub!('- - -', '  - -')
  yaml
end