Class: Stable::Registry
- Inherits:
-
Object
- Object
- Stable::Registry
- Defined in:
- lib/stable/registry.rb
Class Method Summary collapse
Class Method Details
.apps ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/stable/registry.rb', line 17 def self.apps return [] unless File.exist?(file_path) data = YAML.load_file(file_path) || [] data.map do |entry| next entry unless entry.is_a?(Hash) entry.each_with_object({}) do |(k, v), memo| key = k.is_a?(String) ? k.to_sym : k memo[key] = v end end end |