class Mongo::WriteConcern::Acknowledged
An acknowledged write concern provides a get last error command with the appropriate options on each write operation.
@since 2.0.0
Public Instance Methods
acknowledged?()
click to toggle source
Is this write concern acknowledged.
@example Whether this write concern object is acknowledged.
write_concern.acknowledged?
@return [ true, false ] Whether this write concern is acknowledged.
@since 2.5.0
# File lib/mongo/write_concern/acknowledged.rb, line 45 def acknowledged? true end
get_last_error()
click to toggle source
Get the get last error command for the concern.
@example Get the gle command.
acknowledged.get_last_error
@return [ Hash ] The gle command.
@since 2.0.0
# File lib/mongo/write_concern/acknowledged.rb, line 31 def get_last_error @get_last_error ||= { GET_LAST_ERROR => 1 }.merge( Options::Mapper.transform_values_to_strings(options) ) end
inspect()
click to toggle source
Get a human-readable string representation of an acknowledged write concern.
@example Inspect the write concern.
write_concern.inspect
@return [ String ] A string representation of an acknowledged write concern.
@since 2.0.0
# File lib/mongo/write_concern/acknowledged.rb, line 57 def inspect "#<Mongo::WriteConcern::Acknowledged:0x#{object_id} options=#{options}>" end