Method: Mongo::Grid::File::Chunk#==

Defined in:
lib/mongo/grid/file/chunk.rb

#==(other) ⇒ true, false

Check chunk equality.

Examples:

Check chunk equality.

chunk == other

Parameters:

  • other (Object)

    The object ot compare to.

Returns:

  • (true, false)

    If the objects are equal.

Since:

  • 2.0.0



51
52
53
54
# File 'lib/mongo/grid/file/chunk.rb', line 51

def ==(other)
  return false unless other.is_a?(Chunk)
  document == other.document
end