projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Revert "6362: Update bootstrap gem."
[arvados.git]
/
services
/
api
/
lib
/
kind_and_etag.rb
1
module KindAndEtag
2
3
def self.included(base)
4
base.extend(ClassMethods)
5
end
6
7
module ClassMethods
8
def kind
9
'arvados#' + self.to_s.camelcase(:lower)
10
end
11
end
12
13
def kind
14
self.class.kind
15
end
16
17
def etag attrs=nil
18
Digest::MD5.hexdigest((attrs || self.attributes).inspect).to_i(16).to_s(36)
19
end
20
end