Class: BSON::Binary
- Inherits:
-
ByteBuffer
- Object
- ByteBuffer
- BSON::Binary
- Defined in:
- lib/mm_uses_uuid/bson_binary_mixin.rb
Instance Method Summary collapse
Instance Method Details
#eql?(value) ⇒ Boolean
25 26 27 |
# File 'lib/mm_uses_uuid/bson_binary_mixin.rb', line 25 def eql?(value) @str.eql?(value.to_s) && @subtype.eql?(value.subtype) end |
#hash ⇒ Object
21 22 23 |
# File 'lib/mm_uses_uuid/bson_binary_mixin.rb', line 21 def hash [@str, @subtype].hash end |
#inspect ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/mm_uses_uuid/bson_binary_mixin.rb', line 7 def inspect string_render = self.to_s if string_render.empty? "<BSON::Binary:#{object_id}>" else if string_render.length > 32 "<BSON::Binary:'#{string_render[0..8]}...'}'>" else "<BSON::Binary:'#{string_render}'>" end end end |