lib/esse/document.rb in esse-0.3.1 vs lib/esse/document.rb in esse-0.3.2
- old
+ new
@@ -91,18 +91,19 @@
end
def doc_header
{ _id: id }.tap do |h|
h[:_type] = type if type
- h[:_routing] = routing if routing?
+ h[:routing] = routing if routing?
end
end
def inspect
attributes = %i[id routing source].map do |attr|
value = send(attr)
"#{attr}: #{value.inspect}" if value
end.compact.join(', ')
+ attributes << " mutations: #{@__mutations__.inspect}" if @__mutations__
"#<#{self.class.name || 'Esse::Document'} #{attributes}>"
end
def mutate(key)
@__mutations__ ||= {}