Releases: shivam091/unit_measurements
Releases · shivam091/unit_measurements
v5.17.0
What's new
- Added new units
qr
,U
, andz
inlength
. - Added new units
qr
,fir
, andus_qr
inweight
. - Added new units
dun
,sec
, andtwp
inarea
. - Added new units
st
,fir
, andpot
involume
.
What's changed
- Changed implementation of
#units_for!
to raise error if the unit system is not defined
within the unit group. - Changed symbol of
barleycorn
length unit.
v5.16.0
v5.15.0
v5.14.0
v5.13.0
What's new
- Added
Measurement#to_primitive
to convert the measurement to the primitive unit. - Added
#cbrt
method to calculate cube root of the measurement quantity. - Added
#sqrt
method to calculate square root of the measurement quantity. - Aliased
#to_primitive
method as#in_primitive
and#as_primitive
.
v5.12.0
What's new
- Added
MissingPrimitiveUnitError
error if user tries to convert measurement to
the primitive unit but it's not set for the unit group. - Aliased
#+
method as#add
. - Aliased
#-
method as#subtract
. - Aliased
#*
method as#times
and#multiply
. - Aliased
#/
method as#divide
.
v5.11.1
What's changed
- Moved
BaseError
to base file for removing uninitialized constant error in reverse dependencies viz.
unit_measurements-rails and
composite_unit_measurements.
v5.11.0
v5.10.0
What's new
- Added new method
#to_fs
to format the measurement. - Aliased arithmetic method
#**
to#pow
and#^
. - Aliased arithmetic method
#-@
to#inverse
and#negate
. - Added
UnitMeasurements::BlankQuantityError
error if tried to initialize theMeasurement
with a blank quantity. - Added
UnitMeasurements::BlankUnitError
error if tried to initialize theMeasurement
with a blank unit.
What's deprecated
#format
method in favour of#to_fs
.