Method: Cnvrg::Project#set_config

Defined in:
lib/cnvrg/project.rb

#set_config(config) ⇒ Object



354
355
356
357
358
359
360
361
362
# File 'lib/cnvrg/project.rb', line 354

def set_config(config)
  slug = config[:project_slug] rescue nil
  owner = config[:owner] rescue nil
  name = config[:project_name] rescue nil
  if slug.blank? or owner.blank? or name.blank?
    return
  end
  File.open(@working_dir + "/.cnvrg/config.yml", "w+") {|f| f.write config.to_yaml}
end