Method: Milkode::Cdstk#init

Defined in:
lib/milkode/cdstk/cdstk.rb

#init(options) ⇒ Object



54
55
56
57
58
59
60
61
62
63
# File 'lib/milkode/cdstk/cdstk.rb', line 54

def init(options)
  if Dir.emptydir?(@db_dir)
    @yaml = YamlFileWrapper.create(@db_dir)
    @out.puts "create     : #{yaml_file}"
    db_create
    setdb([@db_dir], {}) if (options[:setdb])
  else
    @out.puts "Can't create milkode db (Because not empty in #{db_dir_expand})"
  end
end