Class: Joule::PowerTap::Properties
- Inherits:
-
Object
- Object
- Joule::PowerTap::Properties
- 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
-
#distance_units ⇒ Object
Returns the value of attribute distance_units.
-
#power_units ⇒ Object
Returns the value of attribute power_units.
-
#record_interval ⇒ Object
Returns the value of attribute record_interval.
-
#speed_units ⇒ Object
Returns the value of attribute speed_units.
Instance Method Summary collapse
- #distance_units_are_english? ⇒ Boolean
- #distance_units_are_metric? ⇒ Boolean
- #speed_units_are_english? ⇒ Boolean
- #speed_units_are_metric? ⇒ Boolean
Instance Attribute Details
#distance_units ⇒ Object
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_units ⇒ Object
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_interval ⇒ Object
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_units ⇒ Object
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
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
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
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
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 |