+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
module KindAndEtag
def self.included(base)
self.class.kind
end
- def etag
- Digest::MD5.hexdigest(self.inspect).to_i(16).to_s(36)
+ def etag attrs=nil
+ Digest::MD5.hexdigest((attrs || self.attributes).inspect).to_i(16).to_s(36)
end
end