Method: BSON::Registry#get
- Defined in:
- lib/bson/registry.rb
#get(byte, field = nil) ⇒ Class
Get the class for the single byte identifier for the type in the BSON specification.
44 45 46 47 48 49 50 |
# File 'lib/bson/registry.rb', line 44 def get(byte, field = nil) if type = MAPPINGS[byte] || (byte.is_a?(String) && type = MAPPINGS[byte.ord]) type else handle_unsupported_type!(byte, field) end end |