Method: Mongo::Grid::File::Info#id

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

#idBSON::ObjectId

Get the file id from the file information.

Examples:

Get the file id.

file_info.id

Returns:

  • (BSON::ObjectId)

    The file id.

Since:

  • 2.0.0



127
128
129
# File 'lib/mongo/grid/file/info.rb', line 127

def id
  document[:_id]
end