Method: Pkg::Config.issue_reassignments
- Defined in:
- lib/packaging/config.rb
.issue_reassignments ⇒ Object
We also have renamed various variables as part of deprecations, and
if any of these are still in use, we want to assign the values to the
new variables. However, we skip this if they target variable is already
populated, to avoid overwriting in the case that the user has started
by populating the new variable name but left the old crufty one behind.
379 380 381 382 383 384 385 386 387 |
# File 'lib/packaging/config.rb', line 379 def issue_reassignments Pkg::Params::REASSIGNMENTS.each do |v| oldval = self.instance_variable_get("@#{v[:oldvar]}") newval = self.instance_variable_get("@#{v[:newvar]}") if newval.nil? && oldval self.instance_variable_set("@#{v[:newvar]}", oldval) end end end |