Module: YamlDb::Utils

Defined in:
lib/yaml_db.rb

Class Method Summary collapse

Class Method Details

.chunk_records(records) ⇒ Object


27
28
29
30
31
32
# File 'lib/yaml_db.rb', line 27

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