Sha256: 8c78e47008a870ab5d2fcac4deb1c6b7de96b183b4f5543940c0aeb328f7ac95

Contents?: true

Size: 845 Bytes

Versions: 20

Compression:

Stored size: 845 Bytes

Contents

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

UnitMeasurements::Energy = UnitMeasurements.build do
  primitive "J"

  system :metric do
    si_unit "J", aliases: ["joule", "joules"]
    si_unit "cal", value: "4.1868 J", aliases: ["calorie", "calories"]

    unit "eV", value: "1.602176634e-19 J", aliases: ["electronvolt", "electron volt", "electron-volt"]
  end

  system :centimetre_gram_second do
    unit "erg", value: "1e-7 J", aliases: ["ergs"]
  end

  system :us_customary do
    si_unit "Btu", value: "1055.05585262 J", aliases: ["btu", "btus", "british thermal unit", "british thermal units"]

    unit "thm", value: "100 kBtu", aliases: ["therm", "therms"]
    unit "quad", value: "1.05505585262e+18 J", aliases: ["quads"]
  end

  unit "foe", value: "1e+51 erg", aliases: ["bethe"]
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
unit_measurements-5.8.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.7.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.6.1 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.6.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.5.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.4.1 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.4.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.3.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.2.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.1.1 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.1.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-5.0.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.12.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.11.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.10.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.9.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.8.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.7.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.6.0 lib/unit_measurements/unit_groups/energy.rb
unit_measurements-4.5.0 lib/unit_measurements/unit_groups/energy.rb