Remove threequals from ruby files

This commit is contained in:
Thomas Cioppettini
2014-03-26 12:20:41 -07:00
parent 2beaeed36d
commit 38882eb1a7
10 changed files with 25 additions and 26 deletions

View File

@ -96,13 +96,13 @@ module JsLocaleHelper
end
def self.strip_out_message_formats!(hash, prefix = "", rval = {})
if Hash === hash
hash.each do |k,v|
if Hash === v
rval.merge!(strip_out_message_formats!(v, prefix + (prefix.length > 0 ? "." : "") << k, rval))
elsif k.to_s().end_with?("_MF")
rval[prefix + (prefix.length > 0 ? "." : "") << k] = v
hash.delete(k)
if hash.is_a?(Hash)
hash.each do |key, value|
if value.is_a?(Hash)
rval.merge!(strip_out_message_formats!(value, prefix + (prefix.length > 0 ? "." : "") << key, rval))
elsif key.to_s.end_with?("_MF")
rval[prefix + (prefix.length > 0 ? "." : "") << key] = value
hash.delete(key)
end
end
end