Class: Joule::PowerTap::Properties

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

Constant Summary collapse

ENGLISH_SPEED_UNITS =
"miles/h"
ENGLISH_POWER_UNITS =
"watts"
ENGLISH_DISTANCE_UNITS =
"miles"
METRIC_SPEED_UNITS =
"km/h"
METRIC_POWER_UNITS =
"watts"
METRIC_DISTANCE_UNITS =
"km"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#distance_unitsObject

Returns the value of attribute distance_units.



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

def distance_units
  @distance_units
end

#power_unitsObject

Returns the value of attribute power_units.



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

def power_units
  @power_units
end

#record_intervalObject

Returns the value of attribute record_interval.



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

def record_interval
  @record_interval
end

#speed_unitsObject

Returns the value of attribute speed_units.



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

def speed_units
  @speed_units
end

Instance Method Details

#distance_units_are_english?Boolean

Returns:

  • (Boolean)


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

def distance_units_are_english?()
  return self.distance_units.eql?(ENGLISH_DISTANCE_UNITS)
end

#distance_units_are_metric?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/joule/powertap/properties.rb', line 26

def distance_units_are_metric?()
  return self.distance_units.eql?(METRIC_DISTANCE_UNITS)
end

#speed_units_are_english?Boolean

Returns:

  • (Boolean)


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

def speed_units_are_english?()
  return self.speed_units.eql?(ENGLISH_SPEED_UNITS)
end

#speed_units_are_metric?Boolean

Returns:

  • (Boolean)


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

def speed_units_are_metric?()
  return self.speed_units.eql?(METRIC_SPEED_UNITS)
end