Method: Command::CommandBase#force_change_settings_function
- Defined in:
- lib/commandbase.rb
#force_change_settings_function(pairs) ⇒ Object
設定の強制設定
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/commandbase.rb', line 115 def force_change_settings_function(pairs) settings = Inventory.load("local_setting", :local) 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 |