Class: Stable::Registry
- Inherits:
-
Object
- Object
- Stable::Registry
- Defined in:
- lib/stable/registry.rb
Class Method Summary collapse
Class Method Details
.apps ⇒ Object
15 16 17 |
# File 'lib/stable/registry.rb', line 15 def self.apps File.exist?(file_path) ? YAML.load_file(file_path) : [] end |
.file_path ⇒ Object
6 7 8 |
# File 'lib/stable/registry.rb', line 6 def self.file_path File.join(Stable.root, "apps.yml") end |
.save(apps) ⇒ Object
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 |