Module: CouchbaseOrm::Utils Private

Extended by:
Utils
Included in:
Utils
Defined in:
lib/couchbase-orm/utils.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Utility functions for CouchbaseOrm.

Constant Summary collapse

PLACEHOLDER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

A unique placeholder value that will never accidentally collide with valid values. This is useful as a default keyword argument value when you want the argument to be optional, but you also want to be able to recognize that the caller did not provide a value for it.

Object.new.freeze

Instance Method Summary collapse

Instance Method Details

#placeholder?(value) ⇒ true | false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Asks if the given value is a placeholder or not.

Parameters:

  • value (Object)

    the value to compare

Returns:

  • (true | false)

    if the value is a placeholder or not.



21
22
23
# File 'lib/couchbase-orm/utils.rb', line 21

def placeholder?(value)
  value == PLACEHOLDER
end