lib/bindata/sanitize.rb in bindata-1.4.3 vs lib/bindata/sanitize.rb in bindata-1.4.4
- old
+ new
@@ -186,9 +186,18 @@
warn ":#{bad_key} is not used with #{@the_class}. " +
"You probably want to change this to :#{suggested_key}"
end
end
+ def warn_renamed_parameter(old_key, new_key)
+ val = delete(old_key)
+ if val
+ self[new_key] = val
+ warn ":#{old_key} has been renamed to :#{new_key} in #{@the_class}. " +
+ "Using :#{old_key} is now deprecated and will be removed in the future"
+ end
+ end
+
def endian
@endian || self[:endian]
end
attr_writer :endian