lib/fitgem/helpers.rb
# Defined mappings for unit measurements to labels
Defined mappings for unit measurements to labels
Defined mappings for unit measurements to labels
def unit_mappings
      {
        ApiUnitSystem.US => { :duration => "milliseconds", :distance => "miles", :elevation => "feet", :height => "inches", :weight => "pounds", :measurements => "inches", :liquids => "fl oz", :blood_glucose => "mg/dL" },
        ApiUnitSystem.UK => { :duration => "milliseconds", :distance => "kilometers", :elevation => "meters", :height => "centimeters", :weight => "stone", :measurements => "centimeters", :liquids => "mL", :blood_glucose => "mmol/l" },
        ApiUnitSystem.METRIC => { :duration => "milliseconds", :distance => "kilometers", :elevation => "meters", :height => "centimeters", :weight => "kilograms", :measurements => "centimeters", :liquids => "mL", :blood_glucose => "mmol/l" }
      }
    end
def unit_mappings { ApiUnitSystem . US => { :duration => "milliseconds" , :distance => "miles" , :elevation => "feet" , :height => "inches" , :weight => "pounds" , :measurements => "inches" , :liquids => "fl oz" , :blood_glucose => "mg/dL" } , ApiUnitSystem . UK => { :duration => "milliseconds" , :distance => "kilometers" , :elevation => "meters" , :height => "centimeters" , :weight => "stone" , :measurements => "centimeters" , :liquids => "mL" , :blood_glucose => "mmol/l" } , ApiUnitSystem . METRIC => { :duration => "milliseconds" , :distance => "kilometers" , :elevation => "meters" , :height => "centimeters" , :weight => "kilograms" , :measurements => "centimeters" , :liquids => "mL" , :blood_glucose => "mmol/l" } } end
Defined mappings for unit measurements to labels
Defined mappings for unit measurements to labels