def create(options = {})
      @id ||= Couchbase::Model::UUID.generator.next(1, model.thread_storage[:uuid_algorithm])
      if respond_to?(:valid?) && !valid?
        return false
      end
      options = model.defaults.merge(options)
      value = (options[:format] == :plain) ?  @raw : attributes_with_values
      unless @meta
        @meta = {}
        if @meta.respond_to?(:with_indifferent_access)
          @meta = @meta.with_indifferent_access
        end
      end
      @meta['cas'] = model.bucket.add(@id, value, options)
      self
    end
def create(options = {})
      @id ||= Couchbase::Model::UUID.generator.next(1, model.thread_storage[:uuid_algorithm])
      if respond_to?(:valid?) && !valid?
        return false
      end
      options = model.defaults.merge(options)
      value = (options[:format] == :plain) ?  @raw : attributes_with_values
      unless @meta
        @meta = {}
        if @meta.respond_to?(:with_indifferent_access)
          @meta = @meta.with_indifferent_access
        end
      end
      @meta['cas'] = model.bucket.add(@id, value, options)
      self
    end
Constructor for all subclasses of Couchbase::Model

 @since 0.0.1

 Optionally takes a Hash of attribute value pairs.

 @param [Hash] attrs attribute-value pairs
 Create this model and assign new id if necessary

 @since 0.0.1

 @return [Couchbase::Model, false] newly created object

 @raise [Couchbase::Error::KeyExists] if model with the same +id+
   exists in the bucket

 @example Create the instance of the Post model
   p = Post.new(:title => 'Hello world', :draft => true)
   p.create