Class: Rig::Command::Config::Change

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rig/command/config.rb

Constant Summary collapse

PROPS =
%w{knife user}

Instance Method Summary collapse

Methods inherited from Abstract

#instance_list, #print_table

Instance Method Details

#executeObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rig/command/config.rb', line 8

def execute
  case property
    when "knife"
      Rig.config[:chef][:knife] = value
      Rig.save_configuration
    when "user"
      Rig.config[:ssh][:user] = value
      Rig.save_configuration
    else
      puts "Property #{property} not supported"
  end
end