Sha256: 53e6cdd2664a0d2bd75eeda81417f459a0380d1c13197fb123793da27bef902f

Contents?: true

Size: 994 Bytes

Versions: 21

Compression:

Stored size: 994 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

UnitMeasurements::Density = UnitMeasurements.build do
  primitive "kg/m³"

  system :metric do
    unit "g/m³", aliases: ["g/m^3", "g·m⁻³", "gram per cubic meter", "grams per cubic meter", "gramme per cubic metre", "grammes per cubic metre"]
    unit "kg/m³", value: "1000 g/m³", aliases: ["kg/m^3", "kg·m⁻³", "kilogram per cubic meter", "kilograms per cubic meter", "kilogramme per cubic metre", "kilogrammes per cubic metre"]

    unit "g/l", value: "1 kg/m³", aliases: ["g·l⁻¹", "gram per liter", "grams per liter", "gramme per litre", "grammes per litre"]
    unit "g/ml", value: "1000 g/l", aliases: ["g·ml⁻¹", "gram per milliliter", "grams per milliliter", "gramme per millilitre", "grammes per millilitre"]
    unit "kg/l", value: "1e+6 g/m³", aliases: ["kg·l⁻¹", "kilogram per liter", "kilograms per liter", "kilogramme per litre", "kilogrammes per litre"]
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
unit_measurements-5.5.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.4.1 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.4.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.3.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.2.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.1.1 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.1.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-5.0.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.12.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.11.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.10.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.9.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.8.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.7.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.6.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.5.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.4.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.3.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.2.0 lib/unit_measurements/unit_groups/density.rb
unit_measurements-4.1.0 lib/unit_measurements/unit_groups/density.rb