Method: Command::CommandBase#force_change_settings_function
- Defined in:
- lib/commandbase.rb
#force_change_settings_function(pairs) ⇒ Object
設定の強制設定
129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/commandbase.rb', line 129 def force_change_settings_function(pairs) settings = Inventory.load("local_setting") modified = false pairs.each do |name, value| if settings[name].nil? || settings[name] != value settings[name] = value puts "<bold><cyan>#{name} を #{value} に強制変更しました</cyan></bold>".termcolor modified = true end end settings.save if modified end |