Example code for implementing Optimistic Locking on Couchbase with Ruby.