Method: Avro::LogicalTypes::BytesDecimal#decode

Defined in:
lib/avro/logical_types.rb

#decode(stream) ⇒ BigDecimal

Decode a byte array (in form of a string) into a BigDecimal of the given precision and scale

Parameters:

  • stream (String)

    The byte array to decode

Returns:

  • (BigDecimal)


133
134
135
# File 'lib/avro/logical_types.rb', line 133

def decode(stream)
  from_byte_array(stream) / @factor
end