Class: Fitgem::ApiDistanceUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/fitgem/units.rb

Overview

Enumeration of available distance units that may be used when logging measurements or activities that involve distance.

See https://wiki.fitbit.com/display/API/API-Distance-Unit for more information about using distance units.

Class Method Summary collapse

Class Method Details

.centimetersString

Returns:

  • (String)

42
43
44
# File 'lib/fitgem/units.rb', line 42

def self.centimeters
  "Centimeter"
end

.feetString

Returns:

  • (String)

47
48
49
# File 'lib/fitgem/units.rb', line 47

def self.feet
  "Foot"
end

.inchesString

Returns:

  • (String)

52
53
54
# File 'lib/fitgem/units.rb', line 52

def self.inches
  "Inch"
end

.kilometersString

Returns:

  • (String)

57
58
59
# File 'lib/fitgem/units.rb', line 57

def self.kilometers
  "Kilometer"
end

.metersString

Returns:

  • (String)

62
63
64
# File 'lib/fitgem/units.rb', line 62

def self.meters
  "Meter"
end

.milesString

Returns:

  • (String)

67
68
69
# File 'lib/fitgem/units.rb', line 67

def self.miles
  "Mile"
end

.millimetersString

Returns:

  • (String)

72
73
74
# File 'lib/fitgem/units.rb', line 72

def self.millimeters
  "Millimeter"
end

.stepsString

Steps are only valid distance units when logging walking or running activities. The distance is computed from the stride length the user provides.

Returns:

  • (String)

81
82
83
# File 'lib/fitgem/units.rb', line 81

def self.steps
  "Steps"
end

.yardsString

Returns:

  • (String)

86
87
88
# File 'lib/fitgem/units.rb', line 86

def self.yards
  "Yards"
end