Sha256: 3d415e929b4127e8b22b2d3b88fc00c7648ee6de34c87373c57816371f5a1512

Contents?: true

Size: 858 Bytes

Versions: 12

Compression:

Stored size: 858 Bytes

Contents

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

UnitMeasurements::Area = UnitMeasurements.build do
  primitive "m²"

  system :metric do
    unit "m²", aliases: ["m^2", "sq m", "square meter", "square meters", "square metre", "square metres"]
    unit "km²", value: "1e+6 m²", aliases: ["km^2", "sq km", "square kilometer", "square kilometers", "square kilometre", "square kilometres"]
  end

  system :imperial do
    unit "in²", value: "0.00064516 m²", aliases: ["in^2", "sq in", "square inch", "square inches"]
    unit "ft²", value: "144 in²", aliases: ["ft^2", "sq ft", "square foot", "square feet"]
    unit "yd²", value: "9 ft²", aliases: ["yd^2", "sq yd", "square yard", "square yards"]
    unit "mi²", value: "3097600 yd²", aliases: ["mi^2", "sq mi", "square mile", "square miles"]
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
unit_measurements-4.11.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.10.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.9.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.8.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.7.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.6.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.5.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.4.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.3.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.2.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.1.0 lib/unit_measurements/unit_groups/area.rb
unit_measurements-4.0.0 lib/unit_measurements/unit_groups/area.rb