jeudi 27 avril 2017

How to check of section exists in IniParse.parse using Ruby?

require 'iniparse'

conf = IniParse.parse(File.read('my.conf'))

how do I check if conf['DEFAULT'] exist before reading it?

Aucun commentaire:

Enregistrer un commentaire