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

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

#==(other) ⇒ true, false

Check equality of files.

Examples:

Check the equality of files.

file == other

Parameters:

  • other (Object)

    The object to check against.

Returns:

  • (true, false)

    If the objects are equal.

Since:

  • 2.0.0



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

def ==(other)
  return false unless other.is_a?(File)
  chunks == other.chunks && info == other.info
end