Class: Joule::IBike::Properties

Inherits:
Object
  • Object
show all
Defined in:
lib/joule/ibike/properties.rb

Constant Summary collapse

ENGLISH_UNITS =
"english"
METRIC_UNITS =
"metric"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#calibration_weightObject

Returns the value of attribute calibration_weight.



20
21
22
# File 'lib/joule/ibike/properties.rb', line 20

def calibration_weight
  @calibration_weight
end

#cdaObject

Returns the value of attribute cda.



22
23
24
# File 'lib/joule/ibike/properties.rb', line 22

def cda
  @cda
end

#cmObject

Returns the value of attribute cm.



21
22
23
# File 'lib/joule/ibike/properties.rb', line 21

def cm
  @cm
end

#crrObject

Returns the value of attribute crr.



23
24
25
# File 'lib/joule/ibike/properties.rb', line 23

def crr
  @crr
end

#date_timeObject

Returns the value of attribute date_time.



9
10
11
# File 'lib/joule/ibike/properties.rb', line 9

def date_time
  @date_time
end

#energyObject

Returns the value of attribute energy.



11
12
13
# File 'lib/joule/ibike/properties.rb', line 11

def energy
  @energy
end

#record_intervalObject

Returns the value of attribute record_interval.



12
13
14
# File 'lib/joule/ibike/properties.rb', line 12

def record_interval
  @record_interval
end

#riding_tiltObject

Returns the value of attribute riding_tilt.



19
20
21
# File 'lib/joule/ibike/properties.rb', line 19

def riding_tilt
  @riding_tilt
end

#starting_elevationObject

Returns the value of attribute starting_elevation.



13
14
15
# File 'lib/joule/ibike/properties.rb', line 13

def starting_elevation
  @starting_elevation
end

#starting_pressureObject

Returns the value of attribute starting_pressure.



17
18
19
# File 'lib/joule/ibike/properties.rb', line 17

def starting_pressure
  @starting_pressure
end

#temperatureObject

Returns the value of attribute temperature.



16
17
18
# File 'lib/joule/ibike/properties.rb', line 16

def temperature
  @temperature
end

#total_climbingObject

Returns the value of attribute total_climbing.



14
15
16
# File 'lib/joule/ibike/properties.rb', line 14

def total_climbing
  @total_climbing
end

#total_weightObject

Returns the value of attribute total_weight.



10
11
12
# File 'lib/joule/ibike/properties.rb', line 10

def total_weight
  @total_weight
end

#unitsObject

Returns the value of attribute units.



8
9
10
# File 'lib/joule/ibike/properties.rb', line 8

def units
  @units
end

#versionObject

Returns the value of attribute version.



7
8
9
# File 'lib/joule/ibike/properties.rb', line 7

def version
  @version
end

#wheel_sizeObject

Returns the value of attribute wheel_size.



15
16
17
# File 'lib/joule/ibike/properties.rb', line 15

def wheel_size
  @wheel_size
end

#wind_scalingObject

Returns the value of attribute wind_scaling.



18
19
20
# File 'lib/joule/ibike/properties.rb', line 18

def wind_scaling
  @wind_scaling
end

Instance Method Details

#distance_units_are_english?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/joule/ibike/properties.rb', line 25

def distance_units_are_english?
  self.units_are_english?
end

#distance_units_are_metric?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/joule/ibike/properties.rb', line 29

def distance_units_are_metric?
  self.units_are_metric?
end

#speed_units_are_english?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/joule/ibike/properties.rb', line 33

def speed_units_are_english?
  self.units_are_english?
end

#units_are_english?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/joule/ibike/properties.rb', line 41

def units_are_english?
  self.units.eql?(ENGLISH_UNITS)
end

#units_are_metric?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/joule/ibike/properties.rb', line 45

def units_are_metric?
  self.units.eql?(METRIC_UNITS)
end