Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/bson/binary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ def initialize(data = "", type = :generic)
@type = type
end

# Get a nice string for use with object inspection.
#
# @example Inspect the binary.
# object_id.inspect
#
# @return [ String ] The binary in form BSON::Binary:object_id
#
# @since 2.3.0
def inspect
"BSON::Binary:#{object_id}"
end

# Encode the binary type
#
# @example Encode the binary.
Expand Down