Module: ATK
- Defined in:
- lib/atk/atk_info.rb
Class Method Summary collapse
Class Method Details
.info ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/atk/atk_info.rb', line 44 def self.info settings_path = ATK.paths[:info] atk_settings_key = "atk_settings" # if it doesn't exist then create it if not FS.exist?(settings_path) FS.write("#{atk_settings_key}: {}", to: settings_path) return {} else data = YAML.load_file(settings_path) if data.is_a?(Hash) if data[atk_settings_key].is_a?(Hash) return data[atk_settings_key] end else return {} end end end |
.paths ⇒ Object
32 33 34 |
# File 'lib/atk/atk_info.rb', line 32 def self.paths return AtkPaths end |