Introducing the simple-config gem

require 'simple-config'

txt =<<EOF
file_path: abc def
description: xyx 123
EOF

SimpleConfig.parse txt
#=> {:file_path=>"abc def", :description=>"xyx 123"}

puts SimpleConfig.write(file_path: 'abc/132', description: '11 22 33')

output:

file_path: abc/132

description: 11 22 33

Resources

Tags:
Source:
1622hrs.txt
Published:
22-03-2012 16:22