class BSON::Vector
Vector
of numbers along with metadata for binary interoperability.
Attributes
@return [ Integer
] The number of bits in the final byte that are to be ignored when a vector element’s size is less than a byte and the length of the vector is not a multiple of 8.
Public Class Methods
Source
# File lib/bson/vector.rb, line 38 def initialize(data, dtype, padding = 0) @dtype = dtype @padding = padding super(data.dup) end
@param [ ::Array ] data The data to initialize the vector with. @param [ Integer
] dtype The data type of the vector. @param [ Integer
] padding The number of bits in the final byte that are to be ignored when a vector element’s size is less than a byte and the length of the vector is not a multiple of 8.
Calls superclass method
Public Instance Methods
Source
# File lib/bson/vector.rb, line 29 def data self end
@return [ BSON::ByteBuffer
] The data in the vector.