Method: Mongo::ClusterTime#initialize

Defined in:
lib/mongo/cluster_time.rb

#initialize(elements = nil) ⇒ ClusterTime

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.

Returns a new instance of ClusterTime.



30
31
32
33
34
35
36
# File 'lib/mongo/cluster_time.rb', line 30

def initialize(elements = nil)
  super

  if Lint.enabled? && !self['clusterTime']
    raise ArgumentError, 'Creating a cluster time without clusterTime field'
  end
end