def find_attribute_value(tree, path, default)
      attribute = tree[path.shift]
      if attribute.is_a?(Hash)
        find_attribute_value(attribute, path, default)
      else
        attribute.nil? ? default : attribute
      end
    end
def find_attribute_value(tree, path, default)
      attribute = tree[path.shift]
      if attribute.is_a?(Hash)
        find_attribute_value(attribute, path, default)
      else
        attribute.nil? ? default : attribute
      end
    end
Traverse a hash for an attribute value, with a fallback default
 value if nil.

 @param tree [Hash] to traverse.
 @param path [Array] of attribute keys.
 @param default [Object] value if attribute value is nil.
 @return [Object] attribute or fallback default value.