You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
408 B
19 lines
408 B
# This file contains various useful bits of code
|
|
# that are shared between Haml and Sass.
|
|
|
|
class Hash # :nodoc:
|
|
# Same as Hash#merge!,
|
|
# but recursively merges sub-hashes
|
|
def rec_merge!(other)
|
|
other.each do |key, value|
|
|
myval = self[key]
|
|
if value.is_a?(Hash) && myval.is_a?(Hash)
|
|
myval.rec_merge!(value)
|
|
else
|
|
self[key] = value
|
|
end
|
|
end
|
|
self
|
|
end
|
|
end
|