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