Class: Hobostove::Cli::Upgrade

Inherits:
Object
  • Object
show all
Defined in:
lib/hobostove/cli/upgrade.rb

Class Method Summary collapse

Class Method Details

.performObject



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

Returns:

  • (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