Class: Hobostove::Cli::Upgrade
- Inherits:
-
Object
- Object
- Hobostove::Cli::Upgrade
- Defined in:
- lib/hobostove/cli/upgrade.rb
Class Method Summary collapse
Class Method Details
.perform ⇒ Object
8 9 10 11 12 13 |
# File 'lib/hobostove/cli/upgrade.rb', line 8 def self.perform settings = YAML.load(File.read(Hobostove::Configuration.config_file)) File.open(Hobostove::Configuration.config_file, "w") do |file| file.write [settings].to_yaml end end |
.upgrade_config? ⇒ Boolean
4 5 6 |
# File 'lib/hobostove/cli/upgrade.rb', line 4 def self.upgrade_config? !YAML.load(File.read(Hobostove::Configuration.config_file)).is_a?(Array) end |