Method: Mongo::ClusterTime#advance
- Defined in:
- lib/mongo/cluster_time.rb
#advance(other) ⇒ Object
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.
Advances the cluster time in the receiver to the cluster time in other.
other can be nil or be behind the cluster time in the receiver; in these cases the receiver is returned unmodified. If receiver is advanced, a new ClusterTime object is returned.
Return value is nil or a ClusterTime instance.
45 46 47 48 49 50 51 52 53 |
# File 'lib/mongo/cluster_time.rb', line 45 def advance(other) if self['clusterTime'] && other['clusterTime'] && other['clusterTime'] > self['clusterTime'] then ClusterTime[other] else self end end |