15 16 17
# File 'lib/stable/registry.rb', line 15 def self.apps File.exist?(file_path) ? YAML.load_file(file_path) : [] end
6 7 8
# File 'lib/stable/registry.rb', line 6 def self.file_path File.join(Stable.root, "apps.yml") end
10 11 12 13
# File 'lib/stable/registry.rb', line 10 def self.save(apps) FileUtils.mkdir_p(Stable.root) File.write(file_path, apps.to_yaml) end